Set is_startup=true for exhaustively_free_unused_resource() (#19846)
This commit is contained in:
@ -2339,6 +2339,7 @@ impl Bank {
|
|||||||
// Should not be called outside of startup, will race with
|
// Should not be called outside of startup, will race with
|
||||||
// concurrent cleaning logic in AccountsBackgroundService
|
// concurrent cleaning logic in AccountsBackgroundService
|
||||||
pub fn exhaustively_free_unused_resource(&self, last_full_snapshot_slot: Option<Slot>) {
|
pub fn exhaustively_free_unused_resource(&self, last_full_snapshot_slot: Option<Slot>) {
|
||||||
|
const IS_STARTUP: bool = true; // this is only called at startup, and we want to use more threads
|
||||||
let mut flush = Measure::start("flush");
|
let mut flush = Measure::start("flush");
|
||||||
// Flush all the rooted accounts. Must be called after `squash()`,
|
// Flush all the rooted accounts. Must be called after `squash()`,
|
||||||
// so that AccountsDb knows what the roots are.
|
// so that AccountsDb knows what the roots are.
|
||||||
@ -2350,11 +2351,10 @@ impl Bank {
|
|||||||
// accounts that were included in the bank delta hash when the bank was frozen,
|
// accounts that were included in the bank delta hash when the bank was frozen,
|
||||||
// and if we clean them here, any newly created snapshot's hash for this bank
|
// and if we clean them here, any newly created snapshot's hash for this bank
|
||||||
// may not match the frozen hash.
|
// may not match the frozen hash.
|
||||||
self.clean_accounts(true, false, last_full_snapshot_slot);
|
self.clean_accounts(true, IS_STARTUP, last_full_snapshot_slot);
|
||||||
clean.stop();
|
clean.stop();
|
||||||
|
|
||||||
let mut shrink = Measure::start("shrink");
|
let mut shrink = Measure::start("shrink");
|
||||||
const IS_STARTUP: bool = true; // this is only called at startup, and we want to use more threads
|
|
||||||
self.shrink_all_slots(IS_STARTUP, last_full_snapshot_slot);
|
self.shrink_all_slots(IS_STARTUP, last_full_snapshot_slot);
|
||||||
shrink.stop();
|
shrink.stop();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user