perf(store): hybrid sync.Map + RWMutex in multiversion Store#2856
Draft
perf(store): hybrid sync.Map + RWMutex in multiversion Store#2856
Conversation
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Keep sync.Map for multiVersionMap (lock-free reads essential for OCC workers) while replacing sync.Map with plain map + RWMutex for the three per-tx-index maps (txWritesetKeys, txReadSets, txIterateSets) where contention is low (each worker writes to its own index slot). Eliminates HashTrieMap allocations from per-tx-index maps while preserving lock-free read performance for the hot multiVersionMap path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
bb5063e to
bbff2d7
Compare
f8b8fc9 to
12550b7
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2856 +/- ##
==========================================
- Coverage 46.28% 46.23% -0.05%
==========================================
Files 2005 2005
Lines 163018 163028 +10
==========================================
- Hits 75449 75378 -71
- Misses 81047 81121 +74
- Partials 6522 6529 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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
sync.Mapwith hybridsync.Map+RWMutexin multiversion storeStack
9/19 — depends on perf/replace-syncmap-cachekv (replaces auto-closed #2836)
🤖 Generated with Claude Code