Relationships
#4283 Flaky: v3 replica check broken-lineage restart case reads the lineage fence before the sidecar has started the new lineage
Opened by stack72 · 11/2/2026
What happened
verify-build failed on an unrelated branch (swamp-club#4276, commit b874cb0f5, rebased on main at a50ae3042) in one test:
integration/datastore_v3_replica_verify_test.ts, "v3 replica check: a write that restarts a broken lineage under a live sidecar starts Litestream afresh, though the old lineage's first L0 files expired".
error: AssertionError
at file:///…/integration/datastore_v3_replica_verify_test.ts:399:7
at async …/integration/datastore_v3_litestream_helpers.ts:162:9
at async withReplicationEnv (…/integration/datastore_v3_litestream_helpers.ts:158:5)Line 399 is assert(next > first). After writeReplicaVerification(..., ok: false) and writeCommand(env, 2), the lineage fence read back was not greater than the first one.
Context
- The branch touches no datastore, replica or Litestream code.
- The same test passed in five earlier
verify-buildruns of that branch. - This is a different case from swamp-club#3953, which is the stall case in the same file.
Likely cause (unconfirmed)
The new lineage is started asynchronously by the live sidecar after the failed verification is written. Under the full parallel suite, the write at writeCommand(env, 2) can land before the sidecar has restarted the lineage, so readLineage still returns the old fence.
Suggested fix
Wait for the lineage fence to change (waitFor from @swamp-club/swamp-testing) before asserting on it, instead of reading it once right after the write.
Open
No activity in this phase yet.
Sign in to post a ripple.