Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Handle cleaning of zero-lamport accounts w.r.t. Incremental Snapshots #18870

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion accounts-bench/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ fn main() {
for x in 0..iterations {
if clean {
let mut time = Measure::start("clean");
accounts.accounts_db.clean_accounts(None, false);
accounts.accounts_db.clean_accounts(None, false, None);
time.stop();
println!("{}", time);
for slot in 0..num_slots {
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/blockstore_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,7 @@ fn load_frozen_forks(
// Must be called after `squash()`, so that AccountsDb knows what
// the roots are for the cache flushing in exhaustively_free_unused_resource().
// This could take few secs; so update last_free later
new_root_bank.exhaustively_free_unused_resource();
new_root_bank.exhaustively_free_unused_resource(None);
last_free = Instant::now();
}

Expand Down
2 changes: 1 addition & 1 deletion runtime/benches/accounts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ fn bench_delete_dependencies(bencher: &mut Bencher) {
accounts.add_root(i);
}
bencher.iter(|| {
accounts.accounts_db.clean_accounts(None, false);
accounts.accounts_db.clean_accounts(None, false, None);
});
}

Expand Down
2 changes: 1 addition & 1 deletion runtime/src/accounts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2078,7 +2078,7 @@ mod tests {
}
}
info!("done..cleaning..");
accounts.accounts_db.clean_accounts(None, false);
accounts.accounts_db.clean_accounts(None, false, None);
}

fn load_accounts_no_store(accounts: &Accounts, tx: Transaction) -> Vec<TransactionLoadResult> {
Expand Down
4 changes: 2 additions & 2 deletions runtime/src/accounts_background_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ impl SnapshotRequestHandler {
// accounts that were included in the bank delta hash when the bank was frozen,
// and if we clean them here, the newly created snapshot's hash may not match
// the frozen hash.
snapshot_root_bank.clean_accounts(true, false);
snapshot_root_bank.clean_accounts(true, false, None);
clean_time.stop();

if accounts_db_caching_enabled {
Expand Down Expand Up @@ -399,7 +399,7 @@ impl AccountsBackgroundService {
// slots >= bank.slot()
bank.force_flush_accounts_cache();
}
bank.clean_accounts(true, false);
bank.clean_accounts(true, false, None);
last_cleaned_block_height = bank.block_height();
}
}
Expand Down
Loading