Repository navigation
Fix recycle-bin identity collisions and metadata cleanup ordering (#87) - #97
Draft
AGiorgetti wants to merge 2 commits into
Draft
AGiorgetti wants to merge 2 commits into
AGiorgetti wants to merge 2 commits into
Conversation
Baseline MongoDB 7.0.45/net10 run: 12 expected failures, 10 passes, 0 skips. Product source is unchanged in this commit. Co-authored by Alessandro Giorgetti and Codex (OpenAI).
Use per-attempt stored identities with original bucket and stream metadata, recycle before metadata cleanup, and preserve legacy/public read semantics. Document recovery limits and follow-up #96. Co-authored by Alessandro Giorgetti and Codex (OpenAI).
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.
Scope
Addresses #87 using the selected original option 1. Broader lifecycle/recycle-bin redesign is tracked in #96.
Tests first
The first commit, 28ebbd5, contains regression tests only, against unchanged develop 286c0ae:
The following fix adds coverage for mixed legacy/new reads, live-document isolation, retained checkpoints, cleanup, and retry from a deliberately seeded partial-update state.
Final local validation
Exact published tree: 096a37f00a7528e037b5dc7b4500080c034741c3.
MongoDB 7.0.45 was used locally. MongoDB 8 cannot start in this cloud host because required /sys CPU metadata is unavailable; repository PR CI uses MongoDB 8. net472 was compiled, not executed on Linux. No timing benchmarks or performance guarantees. Independent source review found no blocker within the selected bounded scope.
Exact-head GitHub CI
CI run 39966392401 succeeded on head 01b30a1: Ubuntu and Windows builds, plus MongoDB 8 Linux test jobs for net8.0, net9.0 and net10.0 all passed. No rerun was needed.
Compatibility and limits
New code reads existing recycled documents without backfill. Their lost original bucket remains unknown. Public BucketId remains :rb; OriginalBucketId is stored provenance only. Original-stream recycle queries combine matching histories across buckets and deletion attempts.
Old binaries/raw queries expose the synthetic stored ID for new records, so upgrade recycle readers before new-format deletion. UpdateMany is not atomic across documents; retries give remaining live commits another token. No durable lifetime grouping, automatic restart recovery, concurrent-delete/recreate fencing, or atomic lifecycle guarantee is claimed. Tests seed partial persisted state rather than killing a process.
Controlled deletion/recovery must exclude concurrent stream writes/recreation and drain background metadata work; readers needing all-or-nothing visibility also need that boundary. Default metadata writes are unacknowledged, so successful return is not a verified cleanup barrier. Existing asynchronous cancellation defects remain separately scoped to #86.
Draft for review. Do not merge or publish packages as part of this task.
Co-authored by Alessandro Giorgetti and Codex (OpenAI).