Fix panic during state sync#3638
Conversation
PR SummaryHigh Risk Overview
Adds Reviewed by Cursor Bugbot for commit 87b5344. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 87b5344. Configure here.
| } | ||
| if err := ssGroup.Wait(); err != nil && restoreErr == nil { | ||
| restoreErr = fmt.Errorf("ss import failed during restore: %w", err) | ||
| } |
There was a problem hiding this comment.
SS version set after import failure
Medium Severity
Replacing the SS import panic with ssGroup.Wait() lets restore continue after a failed ssStore.Import and still call SetEarliestVersion and SetLatestVersion at the restore height. The caller gets a non-nil error, but the state store can report it is synced to that height despite a failed or partial import.
Reviewed by Cursor Bugbot for commit 87b5344. Configure here.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3638 +/- ##
==========================================
- Coverage 59.03% 58.15% -0.89%
==========================================
Files 2252 2176 -76
Lines 185720 176896 -8824
==========================================
- Hits 109645 102878 -6767
+ Misses 66258 64928 -1330
+ Partials 9817 9090 -727
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|


Describe your changes and provide context
Fixes an issue where a node could be forced to panic during a state sync