Skip to content

Fix atomic snapshot metadata accounting (#90) - #104

Merged
AGiorgetti merged 4 commits into
developfrom
fix/90-atomic-snapshot-metadata
Nov 4, 2026
Merged

AGiorgetti merged 4 commits into
developfrom
fix/90-atomic-snapshot-metadata

Conversation

@AGiorgetti

@AGiorgetti AGiorgetti commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes #90.

  • Advance SnapshotRevision atomically and subtract only its advance from Unsnapshotted. Preserve concurrent and delayed commit increments and configured write concerns.
  • Preserve missing-head validation and use a documented fallback for legacy missing/null counters. No historical counter repair or lifecycle redesign is claimed.
  • Add deterministic sync/async regression coverage. The CI workflow is restored byte-for-byte to the PR base; temporary integration-only test setup is removed.

Breaking change

MongoDB 4.2+ is required for update pipelines. Upgrade the server before the adapter. No stored-schema migration is needed. Version 4.2 is a feature minimum, not a recommended production version. README and changelog document this requirement.

Validation

Rebased onto develop at 88fdb6b9228b0ad56642b04bab81f9a203349951, including the merged #88 and #89 fixes. The changelog conflict is resolved, and the CI workflow remains identical to the PR base.

Final head fa6f1ecc398ea3086a2b5ddc64f51011b1d53da4: exact-head standard CI passed: Windows and Ubuntu builds plus MongoDB 9 test lanes for net8/net9/net10, each 579/579 passed with zero failures and zero skips.

Historical run 41542168410 at 8155b08:

  • MongoDB 9: 512/512 passed on each of net8/net9/net10, with zero skips.
  • One-time combined runtime verification with PR Fix regressing stream-head revisions after reordered writes (#89) #102 pinned at d12d48a: 536/536 passed, including actual-engine delayed metadata/snapshot interleavings, with zero skips. That temporary job and fixture are not retained.
  • MongoDB 4.2.24: 511/512 passed, zero skips. The existing Stream_head_delete_by_id_should_use_the_builtin_id_index explain-plan assertion failed; this is not a full minimum-version suite pass. No assertion was weakened, fixed, or excluded. The temporary 4.2 job is removed at the user's request.

No local build/tests were run. CI resolves Driver 3.9, not the library's declared 3.0 minimum. MongoDB 4.2 remains the documented feature minimum, not a claim of complete green minimum-version coverage.

Co-authored by Alessandro Giorgetti and Codex (OpenAI).

@AGiorgetti
AGiorgetti force-pushed the fix/90-atomic-snapshot-metadata branch from 88abb10 to fa6f1ec Compare November 3, 2026 12:16
@AGiorgetti
AGiorgetti marked this pull request as ready for review November 4, 2026 15:03
@AGiorgetti
AGiorgetti merged commit 1916eec into develop Nov 4, 2026
5 checks passed
@AGiorgetti
AGiorgetti deleted the fix/90-atomic-snapshot-metadata branch November 4, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[P2] AddSnapshot overwrites a concurrent commit's unsnapshotted increment

1 participant