Spell correction and add remove slot in AccountDB purge assert message (#26358)

nit spell. add remove slots in accoutdb purge assert message
This commit is contained in:
HaoranYi 2022-07-01 12:39:35 -05:00 committed by GitHub
parent d6b53fb173
commit 728986ddf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -5166,7 +5166,11 @@ impl AccountsDb {
.fetch_add(handle_reclaims_elapsed.as_us(), Ordering::Relaxed);
// After handling the reclaimed entries, this slot's
// storage entries should be purged from self.storage
assert!(self.storage.get_slot_stores(remove_slot).is_none());
assert!(
self.storage.get_slot_stores(remove_slot).is_none(),
"slot {} is not none",
remove_slot
);
}
#[allow(clippy::needless_collect)]

View File

@ -1711,9 +1711,9 @@ impl<T: IndexValue> AccountsIndex<T> {
is_slot_list_empty = slot_list.is_empty();
});
// If the slot list is empty, remove the pubkey from `account_maps`. Make sure to grab the
// If the slot list is empty, remove the pubkey from `account_maps`. Make sure to grab the
// lock and double check the slot list is still empty, because another writer could have
// locked and inserted the pubkey inbetween when `is_slot_list_empty=true` and the call to
// locked and inserted the pubkey in-between when `is_slot_list_empty=true` and the call to
// remove() below.
if is_slot_list_empty {
let w_maps = self.get_account_maps_write_lock(pubkey);