Skip to content
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

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

brooksprumo
Copy link

@brooksprumo brooksprumo commented Mar 20, 2024

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.

@brooksprumo brooksprumo self-assigned this Mar 20, 2024
@codecov-commenter
Copy link

codecov-commenter commented Mar 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.8%. Comparing base (182d27f) to head (edfe21d).

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     

@brooksprumo brooksprumo force-pushed the fastboot/ledger-tool branch from 69daadc to edfe21d Compare March 28, 2024 15:17
Comment on lines -301 to -307
// 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);
Copy link
Author

@brooksprumo brooksprumo Mar 28, 2024

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.

@brooksprumo brooksprumo marked this pull request as ready for review March 28, 2024 16:01
Copy link

@apfitzge apfitzge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm - - only PR!

@brooksprumo brooksprumo merged commit 8822aaa into anza-xyz:master Mar 28, 2024
37 checks passed
@brooksprumo brooksprumo deleted the fastboot/ledger-tool branch March 28, 2024 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use case: Repeated ledger-tool verify with fastboot
3 participants