Repository navigation
reduce seal lock contention - #4314
Conversation
PR SummaryMedium Risk Overview
FlatKV block commit seals the four backing view stores (account, code, storage, misc) concurrently on the same Reviewed by Cursor Bugbot for commit ba7c9e2. Bugbot is set up for automated code reviews on this repo. Configure here. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4314 +/- ##
==========================================
- Coverage 67.46% 66.68% -0.78%
==========================================
Files 2179 2081 -98
Lines 167361 158382 -8979
==========================================
- Hits 112903 105617 -7286
+ Misses 54448 52755 -1693
Partials 10 10
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
There was a problem hiding this comment.
Parallelising the per-shard seal and the per-store commit is sound: lock ordering is preserved (no shard-lock holder reaches back for versionLock, and every pending.await happens after the shard lock is released), errs[i]/per-store result variables are written to disjoint slots and read after wg.Wait(), and expectedVersion is read after c.currentVersion++ so the sanity check still compares like for like. No blockers; the notes below are about a now-stale pool contract and two structural points.
Findings: 0 blocking | 3 non-blocking | 3 posted inline
Blockers
- None at the file/PR level.
Non-blocking
- None at the file/PR level.
- 3 suggestion(s)/nit(s) flagged inline on specific lines.
| c.brickLocked(err) | ||
| return nil, 0, err | ||
| } | ||
| c.miscPool.Submit(func() { |
There was a problem hiding this comment.
sealShardsLocked submits one shard.Commit per shard and wg.Waits, all under versionLock. A misc-pool worker that hits a fold failure calls reportFoldFailure → brick(), which blocks on that same versionLock. If every worker is parked there, the seal tasks never start, Wait never returns, and the lock is never released.
There was a problem hiding this comment.
NVM, that seems safe for now since miscPool is an elasticPool
* main: (21 commits) Backport evmonly parse, app-hash and changeset perf fixes from giga-1 (#4345) Remove the oracle module behind a v6.8 upgrade (#4319) fix(seidb): report only the current migration boundary on the snapshot gauge (#4327) fix(flatkv): keep 10 old checkpoints instead of mirroring memIAVL's count (#4322) Backport Autobahn execute-loop and produced-tx metrics from giga-1 (#4330) Add giga.storage.receipts to toggle the Autobahn receipt store (#4333) optimize gather phase (#4326) Regenerate the Unreleased changelog as a plain PR list (#4336) Bump sei-protocol/go-ethereum to v1.15.7-sei-21 (#4332) Fail dynamic-gas precompile out-of-gas as an EVM out-of-gas call (#4318) Add dashboard and topology option for Autobahn e2e (#4167) Add Giga fetch/serve and BlockDB prune metrics (#4329) Add eth_getLogs to the EVM-only Giga RPC (#4308) Generate v6.8 precompiles (#4320) Add [giga] app.toml section and honor it on the Autobahn node (#4323) feat(evmonly): add eth_estimateGas via existing libraries (#4325) Use Pebble batch directly in SS (#4300) Fix pruning issue in SS causing huge disk spike (#4321) Make Autobahn always run the EVM-only executor, disable/remove some integration tests (#4316) reduce seal lock contention (#4314) ...
At around 160k TPS, lock contention during the
commit_seal_storephase prevents us from increasing system velocity. This PR should significantly reduce that contention.