Skip to content

query: bound write loc packs to overlapping lookup write - #508

Merged
reardencode merged 3 commits into
masterfrom
query/write-loc-lifetime
Sep 14, 2026
Merged

query: bound write loc packs to overlapping lookup write#508
reardencode merged 3 commits into
masterfrom
query/write-loc-lifetime

Conversation

@rearden-grok

@rearden-grok rearden-grok Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Write still holds just-written create.loc pairs on its own thread (no create.loc pread).
  • Drop the 1M FIFO. Packs are height-tagged like InFlight; keep_until is lookup_started_hi at note (last TipOnly that may have missed disk loc). Prune when that write batch (and later overlapping batches) finish write. Disconnect drops the suffix and clamps remaining keep-until.
  • ibd: sizes wloc= for occupancy.

Test plan

  • write_create_loc unit: prune at keep_until, no count cap, disconnect clamp
  • fill_same_batch_abs_from_append_loc_ram just-written fill + prune
  • disconnect rewinds loc packs
  • format_sizes wloc= token

Made with Cursor

rbitcoin-grok and others added 3 commits September 13, 2026 19:02
Just-written create.loc is invisible to TipOnly that already started.
Keep those pairs until write of lookup_started_hi at note, with
InFlight-style height packs, not a 1M FIFO. Disconnect drops the suffix.

Co-authored-by: Cursor <cursoragent@cursor.com>
scripthash.rs uses BTreeMap via use super::*. Dropping the crate-root
use broke clippy/test compile.

Co-authored-by: Cursor <cursoragent@cursor.com>
Query mutex was leftover parking for a write-only map. Move packs to
write-thread TLS (atomics for wloc=) and poll disconnect there. Do not
drop the noting pack until a later write below the load drain fence so a
child whose TipOnly skipped loc via InFlight can still fill abs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@reardencode
reardencode merged commit ad08579 into master Sep 14, 2026
16 checks passed
@rearden-grok
rearden-grok Bot deleted the query/write-loc-lifetime branch September 14, 2026 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant