Remove shared reader bottlenecks from WTI lookups - #17
Merged
Merged
Conversation
pathscale
marked this pull request as draft
September 5, 2026 11:20
pathscale
marked this pull request as ready for review
September 5, 2026 13:05
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
ps-reclaimdomain; structural writes copy the root vector and only touched chunks, not the wholeBTreeMap.RwLocks for concurrent point reads, with bounded generation retries and a canonical topology-lock fallback.attach_nodes/attach_multi_nodesreconstruction and replace the misleading mutable-lookingiter_nodesAPI withsnapshot_nodes -> Vec<Node>.Review resolution
snapshot_nodesAPI.T: Send, Node: Send; it can only destroy a uniquely retired pointer and cannot expose or dereference it.The follow-up audits also added a dedicated last-node rekey operation, stale-high/stale-low attachment repair, bounded canonical rebuild on bookkeeping divergence, split/merge hysteresis, miss-before-copy removal, and symmetric recovery tests.
Raw performance
131,072-key pure reads, threads 1/2/4/8 (M lookups/s):
13.644 / 26.843 / 53.410 / 107.624.1442 / 7.8045 / 15.218 / 28.4623.7507 / 7.2218 / 6.5732 / 4.4209At 8 readers the candidate is 6.44x released WTI and scales 6.87x from one reader.
Final local writer-interference run: one million monotonic structural inserts, four stable-key readers, three repetitions (medians):
19.626 M reads/s17.367 M reads/s(-11.5%)459 ns; p99.9:5.25 us152.75 ns/insertBulk reconstruction after the audit fixes remains linear: 8,000 nodes in
1.072 ms.Validation
ReleasetoRelaxedmakes it fail.0..8against localps-reclaim; stale-boundary and recovery paths pass seeds0..4.