Skip to content

Commit

Permalink
AcctIdx: set startup around clean and shrink at startup to flush cache (
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwashington authored Oct 7, 2021
1 parent 5e431fb commit 069586c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5551,6 +5551,11 @@ impl Bank {
}
clean_time.stop();

self.rc
.accounts
.accounts_db
.accounts_index
.set_startup(true);
let mut shrink_all_slots_time = Measure::start("shrink_all_slots");
if !accounts_db_skip_shrink && self.slot() > 0 {
info!("shrinking..");
Expand All @@ -5562,6 +5567,11 @@ impl Bank {
let mut verify_time = Measure::start("verify_bank_hash");
let mut verify = self.verify_bank_hash(test_hash_calculation);
verify_time.stop();
self.rc
.accounts
.accounts_db
.accounts_index
.set_startup(false);

info!("verify_hash..");
let mut verify2_time = Measure::start("verify_hash");
Expand Down

0 comments on commit 069586c

Please sign in to comment.