Repository navigation
feat(id-store): fenced reference-aware graph GC planner (#10253) - #17147
Merged
Merged
Conversation
New graph_gc module + fencing model tests.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
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.
Closes #10253 (slice A-GRAPH-9130-02).
What
pkgs/id/crates/id-store/src/graph_gc.rs: the fencing core for reference-aware graph GC. The reference index carries two generation counters (index + deletion); every destructive step must present aFence(the generation pair observed at plan time) and execution compare-and-swaps it against the current pair — any fresh reference, removed reference, retention pin, or new tombstone in between voids the plan withGcError::StaleFence.PHYSICAL_DELETION_ENABLED = false,executeCAS-validates then refuses withPhysicalDeletionDisabled), per the issue's start trigger — the planner is the deliverable; the storage compare-and-delete adapter follows once the design(atlas): garbage collection for shared stores — large-file priority, segment reclamation #9137/design(pm-stack): content-addressed media/data plane — R2 dedup, reference-based access, GC when the last reference drops #9084 contracts are wired to real storage. Rollback is therefore trivial: every object is preserved.pkgs/id/crates/id-store/tests/graph_gc_fencing.rs: the issue's stated model oracle — interleaved reference creation, stale GC worker, restart (clone = persisted-state reload), and policy retention — plus a 400-step deterministic interleaving checked against an independent state model after every step. The module is included by path, following thegraph_indexpattern (crate-root wiring is slice 9110-09).Premise
The Nov preflights blocked this slice on #9084/#9137/#10234/#10238. All four are now CLOSED and Felix lanes 0640-PA/PG pruned the stale native blockedBy edges today (verified live by lane 0322-AP claim-scan, claim comment on #10253).
Verification
rustc --edition 2024 --teston the test file including the module by path — 8 passed, 0 failed.cargo test -p id-store --test graph_gc_fencingis the issue's stated command; note pkgs/id on main is currently broken by the iroh-blobs split (pkgs/id build broken on main: iroh-blobs 0.105/0.103 split across the iroh-docs boundary (dependabot 8547b8e510) #17130, Felix-claimed, fix in gate) — CI is not a gate per Drew's rule; the diff was read in full against the issue's scope before merge.Lane 0322-AP (Archer seat, delta PRESS 0322 refill).
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.