This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
Call AccountsDb::clean_accounts() directly, inside Bank::verify_snapshot_bank() #27258
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
On startup from a snapshot, the bank is verified after deserialization. In that fn,
Bank::verify_snapshot_bank()
, it callsclean
andshrink
. However,clean
andshrink
specify differentmax_clean_root
s. These should be the same.Since were at startup, there's no outstanding scans that could occur, and no reason why we cannot clean all slots. We do need to make sure 0-lamport accounts are still kept around for slots past the last full snapshot, and that behavior has not changed.
See #27200 for full context
Summary of Changes
In
Bank::verify_snapshot_bank()
, callAccountsDb::clean_accounts()
directly, and setmax_clean_roots
toNone
.