Remove reclaim param for store_accounts_frozen (#618)

remove reclaim param for store_accounts_frozen

Co-authored-by: HaoranYi <haoran.yi@solana.com>
This commit is contained in:
HaoranYi 2024-04-08 14:28:13 -05:00 committed by GitHub
parent 191a997c5f
commit 287d0d2582
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 17 deletions

View File

@ -390,7 +390,6 @@ impl CurrentAncientAccountsFile {
(self.slot(), accounts, accounts_to_store.slot()), (self.slot(), accounts, accounts_to_store.slot()),
None::<Vec<AccountHash>>, None::<Vec<AccountHash>>,
self.accounts_file(), self.accounts_file(),
StoreReclaims::Ignore,
); );
let bytes_written = let bytes_written =
previous_available.saturating_sub(self.accounts_file().accounts.remaining_bytes()); previous_available.saturating_sub(self.accounts_file().accounts.remaining_bytes());
@ -3982,7 +3981,6 @@ impl AccountsDb {
(slot, &shrink_collect.alive_accounts.alive_accounts()[..]), (slot, &shrink_collect.alive_accounts.alive_accounts()[..]),
None::<Vec<AccountHash>>, None::<Vec<AccountHash>>,
shrink_in_progress.new_storage(), shrink_in_progress.new_storage(),
StoreReclaims::Ignore,
); );
rewrite_elapsed.stop(); rewrite_elapsed.stop();
@ -6287,13 +6285,9 @@ impl AccountsDb {
// will be able to find the account in storage // will be able to find the account in storage
let flushed_store = let flushed_store =
self.create_and_insert_store(slot, flush_stats.total_size.0, "flush_slot_cache"); self.create_and_insert_store(slot, flush_stats.total_size.0, "flush_slot_cache");
let (store_accounts_timing_inner, store_accounts_total_inner_us) = measure_us!(self let (store_accounts_timing_inner, store_accounts_total_inner_us) = measure_us!(
.store_accounts_frozen( self.store_accounts_frozen((slot, &accounts[..]), Some(hashes), &flushed_store,)
(slot, &accounts[..]), );
Some(hashes),
&flushed_store,
StoreReclaims::Ignore,
));
flush_stats.store_accounts_timing = store_accounts_timing_inner; flush_stats.store_accounts_timing = store_accounts_timing_inner;
flush_stats.store_accounts_total_us = Saturating(store_accounts_total_inner_us); flush_stats.store_accounts_total_us = Saturating(store_accounts_total_inner_us);
@ -8398,7 +8392,6 @@ impl AccountsDb {
accounts: impl StorableAccounts<'a, T>, accounts: impl StorableAccounts<'a, T>,
hashes: Option<Vec<impl Borrow<AccountHash>>>, hashes: Option<Vec<impl Borrow<AccountHash>>>,
storage: &Arc<AccountStorageEntry>, storage: &Arc<AccountStorageEntry>,
reclaim: StoreReclaims,
) -> StoreAccountsTiming { ) -> StoreAccountsTiming {
// stores on a frozen slot should not reset // stores on a frozen slot should not reset
// the append vec so that hashing could happen on the store // the append vec so that hashing could happen on the store
@ -8410,7 +8403,7 @@ impl AccountsDb {
&StoreTo::Storage(storage), &StoreTo::Storage(storage),
reset_accounts, reset_accounts,
None, None,
reclaim, StoreReclaims::Ignore,
UpdateIndexThreadSelection::PoolWithThreshold, UpdateIndexThreadSelection::PoolWithThreshold,
) )
} }

View File

@ -8,7 +8,7 @@ use {
account_storage::{meta::StoredAccountMeta, ShrinkInProgress}, account_storage::{meta::StoredAccountMeta, ShrinkInProgress},
accounts_db::{ accounts_db::{
AccountStorageEntry, AccountsDb, AliveAccounts, GetUniqueAccountsResult, ShrinkCollect, AccountStorageEntry, AccountsDb, AliveAccounts, GetUniqueAccountsResult, ShrinkCollect,
ShrinkCollectAliveSeparatedByRefs, ShrinkStatsSub, StoreReclaims, ShrinkCollectAliveSeparatedByRefs, ShrinkStatsSub,
}, },
accounts_file::AccountsFile, accounts_file::AccountsFile,
accounts_hash::AccountHash, accounts_hash::AccountHash,
@ -454,7 +454,6 @@ impl AccountsDb {
accounts_to_write, accounts_to_write,
None::<Vec<AccountHash>>, None::<Vec<AccountHash>>,
shrink_in_progress.new_storage(), shrink_in_progress.new_storage(),
StoreReclaims::Ignore,
)); ));
write_ancient_accounts.metrics.accumulate(&ShrinkStatsSub { write_ancient_accounts.metrics.accumulate(&ShrinkStatsSub {

View File

@ -9,9 +9,7 @@ use {
prelude::ParallelSlice, prelude::ParallelSlice,
}, },
solana_accounts_db::{ solana_accounts_db::{
accounts_db::{ accounts_db::{AccountStorageEntry, AccountsDb, GetUniqueAccountsResult, PurgeStats},
AccountStorageEntry, AccountsDb, GetUniqueAccountsResult, PurgeStats, StoreReclaims,
},
accounts_partition, accounts_partition,
}, },
solana_measure::measure, solana_measure::measure,
@ -371,7 +369,6 @@ impl<'a> SnapshotMinimizer<'a> {
(slot, &accounts[..]), (slot, &accounts[..]),
Some(hashes), Some(hashes),
new_storage, new_storage,
StoreReclaims::Ignore,
); );
new_storage.flush().unwrap(); new_storage.flush().unwrap();