query: in-flight is a load-thread map - #278
Merged
Merged
Conversation
Replace InFlightLog/Layer/View with one HashMap (txid→fk, fk→CreatePin) plus a height index. prune_below_height still drops strictly below the #277 drain+fence snapshot; equality keeps because that height may be a partial drain. Snapshot isolation is gone: load notes after stamp. Co-authored-by: Cursor <cursoragent@cursor.com>
WireLoadPipeline holds &InFlight. Load notes the current pack after stamp so that pack is invisible to bind, then prunes below the wave drain+fence snapshot. Delete layer-snapshot tests. Co-authored-by: Cursor <cursoragent@cursor.com>
Owner docs and occupancy copy match the HashMap + height-index model. Prune is still pack height strictly below the lookup-wave drain+fence snapshot; equality keeps. Co-authored-by: Cursor <cursoragent@cursor.com>
WireLoadPipeline.in_flight and test ifo are already &InFlight. Passing &&InFlight trips clippy::needless_borrow under -D warnings. Co-authored-by: Cursor <cursoragent@cursor.com>
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
PR3 of the batch-parent-skeleton plan. Stacked on master after #275 (skeleton) and #277 (drain+fence drop).
InFlightLog/InFlightLayer/InFlightViewto oneInFlightHashMap (txid → fk,fk → CreatePin) with a height index for prefix/suffix drop.WireLoadPipelineborrows it. Insert after stamp so the current pack is invisible to that bind.drain_and_fence_hibefore TipOnly; load drops tagged packs with height below that snapshot after the last batch's in-flight read. Equality keeps (drain fk may sit mid-height). Disconnect stilldrop_from_heighton pack height.make_mutisolation tests.Live pause (do not merge until operator IBD)
iflight=occupancy comparable (height buckets, not exploding).parent create_fk unresolved.Test plan
cargo test -p rbitcoin-query --lib -- in_flight stamp archive_plan inflight_bindscargo test -p rbitcoin-consensus --lib -- bq_resolve stamp_uses_inflight pin_for_wire_incompletecargo test -p rbitcoin-net --lib -- prune_inflight marked_load_batch wire_prep_ahead confirm_engine_pinscargo test -p rbitcoin-test --test scenarios -- wire_prep_ahead confirm_load_aheadfmt/deny/clippy/ast-grep/test/windows/macos/multinode/coverage)Made with Cursor