Skip to content

Conversation

@pdrobnjak
Copy link
Contributor

Summary

  • Replace pure sync.Map with hybrid sync.Map + RWMutex in multiversion store

Stack

9/19 — depends on perf/replace-syncmap-cachekv (replaces auto-closed #2836)

🤖 Generated with Claude Code

@github-actions
Copy link

github-actions bot commented Feb 11, 2026

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedFeb 11, 2026, 2:01 PM

Comment on lines +205 to +207
for index, keys := range s.txWritesetKeys {
writesetKeys[index] = keys
return true
})

}

Check warning

Code scanning / CodeQL

Iteration over map Warning

Iteration over map may be a possible source of non-determinism
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>
@pdrobnjak pdrobnjak force-pushed the perf/replace-syncmap-cachekv branch from bb5063e to bbff2d7 Compare February 11, 2026 13:34
@pdrobnjak pdrobnjak force-pushed the perf/hybrid-syncmap-rwmutex branch from f8b8fc9 to 12550b7 Compare February 11, 2026 13:34
@pdrobnjak pdrobnjak changed the base branch from perf/replace-syncmap-cachekv to main February 11, 2026 13:34
@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 85.18519% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.23%. Comparing base (21e991f) to head (12550b7).

Files with missing lines Patch % Lines
sei-cosmos/store/multiversion/store.go 85.18% 8 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            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     
Flag Coverage Δ
sei-chain 40.87% <77.77%> (-0.05%) ⬇️
sei-cosmos 48.13% <85.18%> (+0.01%) ⬆️
sei-db 68.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
sei-cosmos/store/multiversion/store.go 90.75% <85.18%> (-0.92%) ⬇️

... and 16 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pdrobnjak pdrobnjak marked this pull request as draft February 11, 2026 14:00
@pdrobnjak pdrobnjak self-assigned this Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant