Use already-generated key set to populate dirty keys for clean (#14905)
Don't need to scan the stores again when we already found the key
set of updates per slot. Just insert it earlier.
(cherry picked from commit 65315fa4c2)
This commit is contained in:
@@ -4514,6 +4514,8 @@ impl AccountsDB {
|
||||
// is restored from the append-vec
|
||||
if !accounts_map.is_empty() {
|
||||
let mut _reclaims: Vec<(u64, AccountInfo)> = vec![];
|
||||
let dirty_keys = accounts_map.iter().map(|(pubkey, _info)| *pubkey).collect();
|
||||
self.uncleaned_pubkeys.insert(*slot, dirty_keys);
|
||||
for (pubkey, account_infos) in accounts_map.into_iter() {
|
||||
for (_, (store_id, stored_account)) in account_infos.into_iter() {
|
||||
let account_info = AccountInfo {
|
||||
@@ -4538,7 +4540,6 @@ impl AccountsDB {
|
||||
|
||||
// Need to add these last, otherwise older updates will be cleaned
|
||||
for slot in slots {
|
||||
self.get_accounts_delta_hash(slot);
|
||||
self.accounts_index.add_root(slot, false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user