perf(blockstm): batch MVData index updates - #26773
Open
songgaoye wants to merge 4 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #26773 +/- ##
==========================================
+ Coverage 64.96% 65.05% +0.08%
==========================================
Files 785 785
Lines 55404 55454 +50
==========================================
+ Hits 35994 36073 +79
+ Misses 19410 19381 -29
🚀 New features to boost your workflow:
|
Contributor
|
@greptile review |
Contributor
Greptile SummaryThe PR optimizes BlockSTM index maintenance by adding atomic batched copy-on-write B-tree insertion.
Confidence Score: 5/5The PR appears safe to merge; no actionable correctness, concurrency, security, or repository-rule issue was identified. The batched operation preserves stored-value identity across duplicates and concurrent CAS retries, while BlockSTM readers already tolerate the temporary separation between data publication and bitmap-index updates. Important Files Changed
|
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.
Description
Optimize BlockSTM MVData index updates by batching copy-on-write B-tree insertions.
Previously, each new key called
GetOrDefaultindependently, cloning, freezing, and publishing the B-tree once per key. This PR addsBatchGetOrDefault, which inserts all missing entries through a single copy-on-write update and CAS publication.The MVData consolidation and pre-estimate paths now use the batch operation when adding multiple indexes. The original single-key path is retained because it is faster for one item.
Additional changes:
batch_get_or_defaultlatency metric.Benchmarks
Apple M4, five samples per case with
-benchtime=500ms. “Individual” represents the previous per-key algorithm.Benchmark command:
Testing
Closes: #XXXX