confirm: RecentCreates overlay; one idx batch; snapshot-drain writeq - #133
Merged
Conversation
#131 deferred the 124MiB snapshot clone until write flush, but get and snapshot only read ArcSwap. Concurrent load stamp missed just-noted creates and paid leftover TipOnly (~22k keys / 1.5s per window). Overlay + tombstones make get/snapshot hit those notes without cloning the live map. publish_if_dirty is still the only full clone.
note_recent_creates_defer was calling tx_body_range_batch per height (~0.6s of recent_pub). Collect all planned fks, one idx shot, then note per-height rows. recent_pub= now nests idx= and clone=.
After the RecentCreates overlay, a full-queue merge no longer hides creates from load stamp. Drain every part already in writeq before work starts (cap 20 → 20). Scripts see an empty writeq during the write; one flush_class_c_tip instead of four.
CLASS_C_NS is tables only. The write thread still waits on SH join and flush_class_c_tip — that residual was ~1.9s of other=. Time wall minus tables and put class_c_join= on the write inventory.
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.
Why
#131 deferred the RecentCreates snapshot clone (good) but
get/snapshotonly readArcSwap. Concurrent load stamp missed just-noted creates → leftover_n p50=22k, leftover_ms 1.5s, pin_txid% 48, writeq starved, ~11.9k tx/s vs #129’s ~14.5k in/s.What
publish_if_dirtyremains the only full clone.tx_body_range_batchper write — not per height.recent_pub=(idx= clone=).flush_class_c_tip. Safe only after the overlay.class_c_join=—class_c_commitwall minus tables (SH join / flush). Names the leftover ~1.9sother=.Test
cargo test -p rbitcoin-query recent_createscargo test -p rbitcoin-query stamp_hits_recent_createscargo test -p rbitcoin-consensus recent_createcargo test -p rbitcoin-net format_info_has_stable_tokenscargo test -p rbitcoin-net thr_stats_all_stages_and_note_wire_preferDo not merge unless asked. After green, restart IBD and check leftover_n → 0, pin_txid% → 100, write other= / class_c_join=.