Call `AccountsDb::shrink_all_slots()` directly (#27235)
This commit is contained in:
parent
2184d0ff26
commit
b3c72bc8a2
|
@ -7162,7 +7162,10 @@ impl Bank {
|
||||||
let mut shrink_all_slots_time = Measure::start("shrink_all_slots");
|
let mut shrink_all_slots_time = Measure::start("shrink_all_slots");
|
||||||
if !accounts_db_skip_shrink && self.slot() > 0 {
|
if !accounts_db_skip_shrink && self.slot() > 0 {
|
||||||
info!("shrinking..");
|
info!("shrinking..");
|
||||||
self.shrink_all_slots(true, Some(last_full_snapshot_slot));
|
self.rc
|
||||||
|
.accounts
|
||||||
|
.accounts_db
|
||||||
|
.shrink_all_slots(true, Some(last_full_snapshot_slot));
|
||||||
}
|
}
|
||||||
shrink_all_slots_time.stop();
|
shrink_all_slots_time.stop();
|
||||||
|
|
||||||
|
@ -7458,13 +7461,6 @@ impl Bank {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn shrink_all_slots(&self, is_startup: bool, last_full_snapshot_slot: Option<Slot>) {
|
|
||||||
self.rc
|
|
||||||
.accounts
|
|
||||||
.accounts_db
|
|
||||||
.shrink_all_slots(is_startup, last_full_snapshot_slot);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn print_accounts_stats(&self) {
|
pub fn print_accounts_stats(&self) {
|
||||||
self.rc.accounts.accounts_db.print_accounts_stats("");
|
self.rc.accounts.accounts_db.print_accounts_stats("");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue