Skip to content

Commit

Permalink
Remove reclaim param for store_accounts_frozen (anza-xyz#618)
Browse files Browse the repository at this point in the history
remove reclaim param for store_accounts_frozen

Co-authored-by: HaoranYi <[email protected]>
  • Loading branch information
HaoranYi and HaoranYi authored Apr 8, 2024
1 parent 191a997 commit 287d0d2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 17 deletions.
15 changes: 4 additions & 11 deletions accounts-db/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,6 @@ impl CurrentAncientAccountsFile {
(self.slot(), accounts, accounts_to_store.slot()),
None::<Vec<AccountHash>>,
self.accounts_file(),
StoreReclaims::Ignore,
);
let bytes_written =
previous_available.saturating_sub(self.accounts_file().accounts.remaining_bytes());
Expand Down Expand Up @@ -3982,7 +3981,6 @@ impl AccountsDb {
(slot, &shrink_collect.alive_accounts.alive_accounts()[..]),
None::<Vec<AccountHash>>,
shrink_in_progress.new_storage(),
StoreReclaims::Ignore,
);

rewrite_elapsed.stop();
Expand Down Expand Up @@ -6287,13 +6285,9 @@ impl AccountsDb {
// will be able to find the account in storage
let flushed_store =
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
.store_accounts_frozen(
(slot, &accounts[..]),
Some(hashes),
&flushed_store,
StoreReclaims::Ignore,
));
let (store_accounts_timing_inner, store_accounts_total_inner_us) = measure_us!(
self.store_accounts_frozen((slot, &accounts[..]), Some(hashes), &flushed_store,)
);
flush_stats.store_accounts_timing = store_accounts_timing_inner;
flush_stats.store_accounts_total_us = Saturating(store_accounts_total_inner_us);

Expand Down Expand Up @@ -8398,7 +8392,6 @@ impl AccountsDb {
accounts: impl StorableAccounts<'a, T>,
hashes: Option<Vec<impl Borrow<AccountHash>>>,
storage: &Arc<AccountStorageEntry>,
reclaim: StoreReclaims,
) -> StoreAccountsTiming {
// stores on a frozen slot should not reset
// the append vec so that hashing could happen on the store
Expand All @@ -8410,7 +8403,7 @@ impl AccountsDb {
&StoreTo::Storage(storage),
reset_accounts,
None,
reclaim,
StoreReclaims::Ignore,
UpdateIndexThreadSelection::PoolWithThreshold,
)
}
Expand Down
3 changes: 1 addition & 2 deletions accounts-db/src/ancient_append_vecs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use {
account_storage::{meta::StoredAccountMeta, ShrinkInProgress},
accounts_db::{
AccountStorageEntry, AccountsDb, AliveAccounts, GetUniqueAccountsResult, ShrinkCollect,
ShrinkCollectAliveSeparatedByRefs, ShrinkStatsSub, StoreReclaims,
ShrinkCollectAliveSeparatedByRefs, ShrinkStatsSub,
},
accounts_file::AccountsFile,
accounts_hash::AccountHash,
Expand Down Expand Up @@ -454,7 +454,6 @@ impl AccountsDb {
accounts_to_write,
None::<Vec<AccountHash>>,
shrink_in_progress.new_storage(),
StoreReclaims::Ignore,
));

write_ancient_accounts.metrics.accumulate(&ShrinkStatsSub {
Expand Down
5 changes: 1 addition & 4 deletions runtime/src/snapshot_minimizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ use {
prelude::ParallelSlice,
},
solana_accounts_db::{
accounts_db::{
AccountStorageEntry, AccountsDb, GetUniqueAccountsResult, PurgeStats, StoreReclaims,
},
accounts_db::{AccountStorageEntry, AccountsDb, GetUniqueAccountsResult, PurgeStats},
accounts_partition,
},
solana_measure::measure,
Expand Down Expand Up @@ -371,7 +369,6 @@ impl<'a> SnapshotMinimizer<'a> {
(slot, &accounts[..]),
Some(hashes),
new_storage,
StoreReclaims::Ignore,
);

new_storage.flush().unwrap();
Expand Down

0 comments on commit 287d0d2

Please sign in to comment.