Fix composite snapshot import hang on EVM errors#3091
Conversation
Stop forwarding snapshot nodes once an importer fails so CompositeStateStore.Import can return the underlying error instead of blocking on a full evmCh buffer. Add a regression test that reproduces the hang by making the EVM importer exit early while more than 100 EVM nodes remain. Made-with: Cursor
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3091 +/- ##
=======================================
Coverage 58.71% 58.71%
=======================================
Files 2094 2094
Lines 172972 173013 +41
=======================================
+ Hits 101563 101589 +26
- Misses 62426 62437 +11
- Partials 8983 8987 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
| for { | ||
| select { | ||
| case err := <-importErrCh: | ||
| if err != nil && importErr == nil { |
There was a problem hiding this comment.
[optional]: If both cosmos and EVM importers fail, only the first error captured in importErr is returned. The second is discarded.
do we need to handle the cosmos importer failure errors? and adding testings for dual failures etc
|
/backport |
|
Created backport PR for
Please cherry-pick the changes locally and resolve any conflicts. git fetch origin backport-3091-to-release/v6.4
git worktree add --checkout .worktree/backport-3091-to-release/v6.4 backport-3091-to-release/v6.4
cd .worktree/backport-3091-to-release/v6.4
git reset --hard HEAD^
git cherry-pick -x 7fd79a0d2e4811246666bacc8ee6cc0a0da32abe
git push --force-with-lease |
- Fixes hang in CompositeStateStore.Import when EVMStateStore.Import returns early on error and evmCh later fills - Stops forwarding snapshot nodes after an import failure and adds a unit test for that path - Unit tests - Verifying on node (cherry picked from commit 7fd79a0)
## Describe your changes and provide context - Fixes hang in CompositeStateStore.Import when EVMStateStore.Import returns early on error and evmCh later fills - Stops forwarding snapshot nodes after an import failure and adds a unit test for that path ## Testing performed to validate your change - Unit tests - Verifying on node
Describe your changes and provide context
Testing performed to validate your change