Repository navigation
Fix regressing stream-head revisions after reordered writes (#89) - #102
Merged
Merged
Conversation
AGiorgetti
marked this pull request as ready for review
November 3, 2026 11:25
AGiorgetti
force-pushed
the
fix/89-monotonic-head-revisions
branch
from
November 3, 2026 11:43
d1bf6f4 to
431fd66
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, commit-side stream-head metadata assigned HeadRevision unconditionally, so an older background write can overwrite a newer acknowledged revision. The sync/async commit metadata updates now use
$maxfor HeadRevision, retaining each write's$incfor Unsnapshotted and preserving SnapshotRevision. The changelog and stream-head documentation describe the invariants and boundaries.Coverage includes missing-head upserts, existing heads, existing snapshots, duplicate commit retries, and deletion/recreation after metadata writes have drained. Snapshot-side concurrency remains #90, and concurrent deletion/recreation remains held #96. Historical combined #89/#90 validation is recorded in #104; this PR does not claim to fix snapshot counter races or backfill previously regressed metadata.
Validation: local restore/test execution is blocked by the previously denied restore operation; no local restore retry was made. Tests-first CI at e8aba2c reproduced six revision-regression failures with 486 passing and zero skipped tests per .NET 8/9/10 target. Before conflict resolution, the implementation at d12d48a passed CI: Windows/Ubuntu builds and all 492 tests on each .NET 8/9/10 target, with zero failures or skips. The test project resolves MongoDB.Driver 3.9.0 against MongoDB 9.0.4; this does not establish runtime compatibility with the library's declared driver 3.0.0.
Conflict resolution (2026-11-03): rebased the three commits onto develop at 67d0a9d, preserving both #88 and #89 changelog entries and all source changes. GitHub reports the branch as rebaseable. Current head 431fd66 passed CI: Windows/Ubuntu builds and 537 tests on each .NET 8/9/10 target, zero failures or skips. Its final tree is identical to the earlier merge-based resolution d1bf6f4, which also passed CI; that merge was replaced because it did not resolve GitHub's rebase conflict. No local tests ran because the cloud environment has no .NET SDK. No workflow changes were made.
Fixes #89.
Co-authored by Alessandro Giorgetti and Codex (OpenAI).