From 287d0d2582eccea56a106d1308076558eac10e71 Mon Sep 17 00:00:00 2001 From: HaoranYi Date: Mon, 8 Apr 2024 14:28:13 -0500 Subject: [PATCH] Remove reclaim param for store_accounts_frozen (#618) remove reclaim param for store_accounts_frozen Co-authored-by: HaoranYi --- accounts-db/src/accounts_db.rs | 15 ++++----------- accounts-db/src/ancient_append_vecs.rs | 3 +-- runtime/src/snapshot_minimizer.rs | 5 +---- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/accounts-db/src/accounts_db.rs b/accounts-db/src/accounts_db.rs index 28307da0829619..8034e5ae45262e 100644 --- a/accounts-db/src/accounts_db.rs +++ b/accounts-db/src/accounts_db.rs @@ -390,7 +390,6 @@ impl CurrentAncientAccountsFile { (self.slot(), accounts, accounts_to_store.slot()), None::>, self.accounts_file(), - StoreReclaims::Ignore, ); let bytes_written = previous_available.saturating_sub(self.accounts_file().accounts.remaining_bytes()); @@ -3982,7 +3981,6 @@ impl AccountsDb { (slot, &shrink_collect.alive_accounts.alive_accounts()[..]), None::>, shrink_in_progress.new_storage(), - StoreReclaims::Ignore, ); rewrite_elapsed.stop(); @@ -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); @@ -8398,7 +8392,6 @@ impl AccountsDb { accounts: impl StorableAccounts<'a, T>, hashes: Option>>, storage: &Arc, - reclaim: StoreReclaims, ) -> StoreAccountsTiming { // stores on a frozen slot should not reset // the append vec so that hashing could happen on the store @@ -8410,7 +8403,7 @@ impl AccountsDb { &StoreTo::Storage(storage), reset_accounts, None, - reclaim, + StoreReclaims::Ignore, UpdateIndexThreadSelection::PoolWithThreshold, ) } diff --git a/accounts-db/src/ancient_append_vecs.rs b/accounts-db/src/ancient_append_vecs.rs index 09fe17a39e1078..7e9afcc493f062 100644 --- a/accounts-db/src/ancient_append_vecs.rs +++ b/accounts-db/src/ancient_append_vecs.rs @@ -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, @@ -454,7 +454,6 @@ impl AccountsDb { accounts_to_write, None::>, shrink_in_progress.new_storage(), - StoreReclaims::Ignore, )); write_ancient_accounts.metrics.accumulate(&ShrinkStatsSub { diff --git a/runtime/src/snapshot_minimizer.rs b/runtime/src/snapshot_minimizer.rs index e39c298fb1aaaf..de8771453956c6 100644 --- a/runtime/src/snapshot_minimizer.rs +++ b/runtime/src/snapshot_minimizer.rs @@ -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, @@ -371,7 +369,6 @@ impl<'a> SnapshotMinimizer<'a> { (slot, &accounts[..]), Some(hashes), new_storage, - StoreReclaims::Ignore, ); new_storage.flush().unwrap();