convert some get_slot_stores -> get_slot_storage_entry (#29557)
This commit is contained in:
parent
453b61676e
commit
33119f8a87
|
@ -5822,7 +5822,7 @@ impl AccountsDb {
|
|||
// 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(),
|
||||
self.storage.get_slot_storage_entry(remove_slot).is_none(),
|
||||
"slot {remove_slot} is not none"
|
||||
);
|
||||
}
|
||||
|
|
|
@ -84,12 +84,10 @@ impl AccountsDb {
|
|||
notified_accounts: &mut HashSet<Pubkey>,
|
||||
notify_stats: &mut GeyserPluginNotifyAtSnapshotRestoreStats,
|
||||
) {
|
||||
let slot_stores = self.storage.get_slot_stores(slot).unwrap();
|
||||
let storage_entry = self.storage.get_slot_storage_entry(slot).unwrap();
|
||||
|
||||
let slot_stores = slot_stores.read().unwrap();
|
||||
let mut accounts_to_stream: HashMap<Pubkey, StoredAccountMeta> = HashMap::default();
|
||||
let mut measure_filter = Measure::start("accountsdb-plugin-filtering-accounts");
|
||||
for (_, storage_entry) in slot_stores.iter() {
|
||||
let accounts = storage_entry.accounts.account_iter();
|
||||
let mut account_len = 0;
|
||||
accounts.for_each(|account| {
|
||||
|
@ -109,9 +107,8 @@ impl AccountsDb {
|
|||
entry.insert(account);
|
||||
}
|
||||
}
|
||||
});
|
||||
notify_stats.total_accounts += account_len;
|
||||
}
|
||||
});
|
||||
measure_filter.stop();
|
||||
notify_stats.elapsed_filtering_us += measure_filter.as_us() as usize;
|
||||
|
||||
|
|
Loading…
Reference in New Issue