Serialize concurrent rollout writers before assigning paginated ordinals
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
Two independent RolloutRecorder instances can resume the same paginated rollout, each read the same tail ordinal, and append duplicate ordinals. The rollout projection then fails with an ordinal mismatch even though the JSONL remains syntactically valid.
This patch fixes the owning writer seam by taking an OS-level exclusive lock for each append batch, refreshing ordinal state from the durable tail while locked, and applying the same protection to the cold append path. It also adds a regression test that resumes two recorders and asserts the resulting ordinals are contiguous and unique.
The patch contains no rollout contents, credentials, or account-specific configuration.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the RolloutRecorder append path and trace how paginated ordinal state is read and updated. Reproduce the two-recorder resume case, then run or extend the regression test so append batches, including the cold path, produce contiguous, unique ordinals without projection mismatches.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100