query: RecentCreates snapshot COW and head RCU - #261
Merged
Conversation
added 2 commits
August 25, 2026 18:23
snapshot cloned the pending HashMap on every stamp. Hold pending as Arc<LiveMap>: snapshot Arc-clones; note/filter make_mut; empty maps reuse one process Arc. Closes algo-review P17.
publish_layer/drop_ready/drop_from/expire_through stored a chain built from a stale load_full. CAS the ArcSwap head and retry; a lost drop_from vs publish cannot restore dropped heights. Closes algo-review Q-M2.
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.
What
RecentCreates::snapshotno longer clones the pending HashMap on every stamp. Pending is a COWArc<LiveMap>: snapshot Arc-clones;note*/filter_pendingmake_mut; empty pending reuses one process Arc.Head publish/drop is RCU.
publish_layer/drop_ready/drop_from/expire_throughCAS-splice vialayer_chain::{cas_head,rcu_head}and retry on a lost CAS. A staleload_fullthenstorecannot restoredrop_fromheights.Why
Stamp snapshots were copying the pending map (pins included) every wave (algo-review P17). Head update was load-then-store, safe only if the write thread was the sole mutator — unenforced, and
drop_fromis on the reorg path (Q-M2).Algo-review
Closes P17 and Q-M2 by deleting those rows in the same commits as the fixes.
Independent of
confirm/wire-plan-batch.Tests
snapshot()calls with nonote*/publish_layer/drop_*share pending byArc::ptr_eqnote_pinsdoes not see the note; after does;create_pinArc-clones the pincas_headagainst a staledrop_fromhead fails; retry prepends onto the current head; dropped height stays gone