avoid incorrect internal assert in purge_slot_cache_pubkeys (#31344)

This commit is contained in:
Jeff Washington (jwash) 2023-04-26 11:09:38 -05:00 committed by GitHub
parent c73b6545e6
commit 6f7429556b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -5912,7 +5912,10 @@ impl AccountsDb {
pubkeys_removed_from_accounts_index: &PubkeysRemovedFromAccountsIndex,
) {
// Slot purged from cache should not exist in the backing store
assert!(self.storage.get_slot_storage_entry(purged_slot).is_none());
assert!(self
.storage
.get_slot_storage_entry_shrinking_in_progress_ok(purged_slot)
.is_none());
let num_purged_keys = pubkey_to_slot_set.len();
let (reclaims, _) = self.purge_keys_exact(pubkey_to_slot_set.iter());
assert_eq!(reclaims.len(), num_purged_keys);