Repository navigation
docs(engine): audit DecrementGuard/SlotBarrier release-race surface (DG-1) - #4744
Merged
Merged
Conversation
…DG-1) Catalogues the Arc<SlotBarrier> clone sites, the single DecrementGuard construction site, the Condvar notify ordering, and the 1000-iteration spin-then-yield workaround in ParallelDeltaApplier::finish_file. Enumerates six restructure paths with per-site blast radius so DG-2 can pick a clean fix and DG-3 can scope the diff. Pure documentation; no code touched.
This was referenced May 22, 2026
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…DG-1) (#4744) Catalogues the Arc<SlotBarrier> clone sites, the single DecrementGuard construction site, the Condvar notify ordering, and the 1000-iteration spin-then-yield workaround in ParallelDeltaApplier::finish_file. Enumerates six restructure paths with per-site blast radius so DG-2 can pick a clean fix and DG-3 can scope the diff. Pure documentation; no code touched.
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.
Summary
DG-1 audit doc feeding the DG-2 restructure design and DG-3 implementation. Catalogues the
Arc<SlotBarrier>+DecrementGuardsurface incrates/engine/src/concurrent_delta/parallel_apply.rsand traces the wake-before-Arc-drop race that the spin-then-yield workaround atparallel_apply.rs:729-748papers over.Adds
docs/design/decrementguard-audit.md(329 lines). No code touched.The doc covers:
Arc<SlotBarrier>clone sites (5 production, 2 test) with file:line, holder, lifetime, release path.DecrementGuardconstruction site atparallel_apply.rs:394and the singleSlotHandle::newsite atparallel_apply.rs:847.decrement_inflightatparallel_apply.rs:340, insideDecrementGuard::drop.notify_allfires before the implicit field-drop ofDecrementGuard.barrier, and whyArc::try_unwrapatparallel_apply.rs:749observesstrong_count = 2on Windows.parallel_apply.rs:720-728, loop at729-748, origin commit3e5d83d95dc6(PR feat(engine): add flush_workers/drain_inflight barrier API to ParallelDeltaApplier (FFB-2) #4665).concurrent_register_and_dispatch_on_overlapping_filesflake.Recommendation for DG-2: split
SlotBarrierintoBarrierState+SlotData(Option B) for the smallest contained diff, or move to an Arc-drop wait list (Option D) for cleaner semantics at the cost of touching the diagnostic counter story.Test plan
docs/design/decrementguard-audit.mdonly).