clean up is_ancient in is_candidate_for_shrink (#31616)
clean up `is_ancient` in `is_candidate_for_shrink`
This commit is contained in:
parent
6172b0d50c
commit
eaaed0a726
|
@ -7933,7 +7933,11 @@ impl AccountsDb {
|
|||
store: &Arc<AccountStorageEntry>,
|
||||
allow_shrink_ancient: bool,
|
||||
) -> bool {
|
||||
let total_bytes = if is_ancient(&store.accounts) {
|
||||
// appended ancient append vecs should not be shrunk by the normal shrink codepath.
|
||||
// It is not possible to identify ancient append vecs when we pack, so no check for ancient when we are not appending.
|
||||
let total_bytes = if self.create_ancient_storage == CreateAncientStorage::Append
|
||||
&& is_ancient(&store.accounts)
|
||||
{
|
||||
if !allow_shrink_ancient {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue