-
Notifications
You must be signed in to change notification settings - Fork 203
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
Do not purge all bank snapshots after fastboot #345
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #345 +/- ##
=========================================
- Coverage 81.8% 81.8% -0.1%
=========================================
Files 842 842
Lines 228492 228491 -1
=========================================
- Hits 187104 187053 -51
- Misses 41388 41438 +50 |
69daadc
to
edfe21d
Compare
// If the node crashes before taking the next bank snapshot, the next startup will attempt | ||
// to load from the same bank snapshot again. And if `shrink` has run, the account storage | ||
// files that are hard linked in bank snapshot will be *different* than what the bank | ||
// snapshot expects. This would cause the node to crash again. To prevent that, purge all | ||
// the bank snapshots here. In the above scenario, this will cause the node to load from a | ||
// snapshot archive next time, which is safe. | ||
snapshot_utils::purge_all_bank_snapshots(&snapshot_config.bank_snapshots_dir); |
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.
Now that #120 was merged, there are no more issues related to shrink. So this original concern has been mitigated.
Where was a second issue that purging all the bank snapshots here also fixed: solana-labs#35367. It has been fixed by #343, so now there are no more blockers to removing this code.
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.
lgtm - -
only PR!
Problem
Please see solana-labs#35431
Summary of Changes
Do not purge all bank snapshots after fastbooting.
Fixes solana-labs#35431
Additional Testing
I ran leger-tool built from this PR on a mnb bank snapshot and confirmed I was able to repeatably use fastboot. Yay!
What's also really cool, is now that the storages recycler has been removed, we can fastboot from older bank snapshots as well; not just the latest.