-
Notifications
You must be signed in to change notification settings - Fork 972
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(libs/pidstore): Detect corruption on startup and reset pidstore #3132
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #3132 +/- ##
==========================================
+ Coverage 51.08% 51.47% +0.38%
==========================================
Files 177 177
Lines 11157 11170 +13
==========================================
+ Hits 5700 5750 +50
+ Misses 4958 4926 -32
+ Partials 499 494 -5 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't think of any other reason why It could get corrupted besides an ungrateful shutdown. In this case just doing that only for pidstore might not solve the issue. Lets ask conduit if this fixes the issue for them without resetting the node and only after merge it
@Wondertan I agree that an ungraceful shutdown is most likely the cause for this. IMO fix is still ok to implement as pidstore is non-essential. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are other datastore corruptions that happen, I wonder if we can wrap badger startup similarly or something (not resetting it, but just by giving a more readable error output when detected)
The recovery of an existing pidstore is not critical to node functionality and should not block the node's start-up if it was corrupted during an ungraceful shutdown. If corruption is detected, a fresh pidstore can be instantiated and used by the node.
Found by conduit.