Skip to content

perf(flatkv): parallelize per-DB batch commit#3020

Merged
blindchaser merged 6 commits intomainfrom
yiren/flatkv-commit
Mar 5, 2026
Merged

perf(flatkv): parallelize per-DB batch commit#3020
blindchaser merged 6 commits intomainfrom
yiren/flatkv-commit

Conversation

@blindchaser
Copy link
Contributor

Describe your changes and provide context

Testing performed to validate your change

@github-actions
Copy link

github-actions bot commented Mar 4, 2026

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMar 5, 2026, 7:39 PM

@codecov
Copy link

codecov bot commented Mar 4, 2026

Codecov Report

❌ Patch coverage is 84.61538% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.41%. Comparing base (8bcbcd3) to head (ff685da).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
sei-db/state_db/sc/flatkv/store_write.go 84.61% 3 Missing and 3 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3020      +/-   ##
==========================================
+ Coverage   58.39%   58.41%   +0.01%     
==========================================
  Files        2110     2110              
  Lines      174991   175004      +13     
==========================================
+ Hits       102192   102229      +37     
+ Misses      63772    63753      -19     
+ Partials     9027     9022       -5     
Flag Coverage Δ
sei-chain-pr 63.08% <84.61%> (?)
sei-db 70.41% <ø> (ø)

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

Files with missing lines Coverage Δ
sei-db/state_db/sc/flatkv/store_write.go 77.49% <84.61%> (+5.22%) ⬆️

... and 26 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.

Comment on lines +291 to +294
go func(idx int, db types.KeyValueDB) {
defer wg.Done()
errs[idx] = db.Flush()
}(i, db)

Check notice

Code scanning / CodeQL

Spawning a Go routine Note

Spawning a Go routine may be a possible source of non-determinism
Comment on lines +453 to +456
go func(idx int, b types.Batch) {
defer wg.Done()
errs[idx] = b.Commit(syncOpt)
}(i, p.batch)

Check notice

Code scanning / CodeQL

Spawning a Go routine Note

Spawning a Go routine may be a possible source of non-determinism
@blindchaser blindchaser enabled auto-merge (squash) March 5, 2026 16:31
@blindchaser blindchaser disabled auto-merge March 5, 2026 16:45
@blindchaser blindchaser enabled auto-merge (squash) March 5, 2026 19:53
@blindchaser blindchaser merged commit 6a57c4d into main Mar 5, 2026
39 checks passed
@blindchaser blindchaser deleted the yiren/flatkv-commit branch March 5, 2026 19:56
yzang2019 pushed a commit that referenced this pull request Mar 19, 2026
## Describe your changes and provide context

## Testing performed to validate your change
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.

4 participants