Flush accounts cache before calling clean_accounts() (#19839)
This commit is contained in:
@ -1194,6 +1194,7 @@ fn load_frozen_forks(
|
|||||||
) {
|
) {
|
||||||
info!("Taking snapshot of new root bank that has crossed the full snapshot interval! slot: {}", *root);
|
info!("Taking snapshot of new root bank that has crossed the full snapshot interval! slot: {}", *root);
|
||||||
*last_full_snapshot_slot = Some(*root);
|
*last_full_snapshot_slot = Some(*root);
|
||||||
|
new_root_bank.force_flush_accounts_cache();
|
||||||
new_root_bank.clean_accounts(true, true, *last_full_snapshot_slot);
|
new_root_bank.clean_accounts(true, true, *last_full_snapshot_slot);
|
||||||
new_root_bank.update_accounts_hash_with_index_option(
|
new_root_bank.update_accounts_hash_with_index_option(
|
||||||
snapshot_config.accounts_hash_use_index,
|
snapshot_config.accounts_hash_use_index,
|
||||||
|
@ -2009,6 +2009,12 @@ impl AccountsDb {
|
|||||||
} else {
|
} else {
|
||||||
let mut key_set = HashSet::new();
|
let mut key_set = HashSet::new();
|
||||||
key_set.insert(*key);
|
key_set.insert(*key);
|
||||||
|
assert!(
|
||||||
|
!account_info.is_cached(),
|
||||||
|
"The Accounts Cache must be flushed first for this account info. pubkey: {}, slot: {}",
|
||||||
|
*key,
|
||||||
|
*slot
|
||||||
|
);
|
||||||
let count = self
|
let count = self
|
||||||
.storage
|
.storage
|
||||||
.slot_store_count(*slot, account_info.store_id)
|
.slot_store_count(*slot, account_info.store_id)
|
||||||
|
Reference in New Issue
Block a user