slots_per_epoch shouldn't be optional (#27256)
This commit is contained in:
parent
7fda0287cb
commit
9d5029da15
|
@ -6664,9 +6664,8 @@ impl AccountsDb {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// storages are sorted by slot and have range info.
|
/// storages are sorted by slot and have range info.
|
||||||
/// if we know slots_per_epoch, then add all stores older than slots_per_epoch to dirty_stores so clean visits these slots
|
/// add all stores older than slots_per_epoch to dirty_stores so clean visits these slots
|
||||||
fn mark_old_slots_as_dirty(&self, storages: &SortedStorages, slots_per_epoch: Option<Slot>) {
|
fn mark_old_slots_as_dirty(&self, storages: &SortedStorages, slots_per_epoch: Slot) {
|
||||||
if let Some(slots_per_epoch) = slots_per_epoch {
|
|
||||||
let max = storages.max_slot_inclusive();
|
let max = storages.max_slot_inclusive();
|
||||||
let acceptable_straggler_slot_count = 100; // do nothing special for these old stores which will likely get cleaned up shortly
|
let acceptable_straggler_slot_count = 100; // do nothing special for these old stores which will likely get cleaned up shortly
|
||||||
let sub = slots_per_epoch + acceptable_straggler_slot_count;
|
let sub = slots_per_epoch + acceptable_straggler_slot_count;
|
||||||
|
@ -6680,7 +6679,6 @@ impl AccountsDb {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
pub(crate) fn calculate_accounts_hash_helper(
|
pub(crate) fn calculate_accounts_hash_helper(
|
||||||
&self,
|
&self,
|
||||||
|
@ -6916,7 +6914,7 @@ impl AccountsDb {
|
||||||
"cannot accurately capture all data for debugging if accounts cache is being used"
|
"cannot accurately capture all data for debugging if accounts cache is being used"
|
||||||
);
|
);
|
||||||
|
|
||||||
self.mark_old_slots_as_dirty(storages, Some(config.epoch_schedule.slots_per_epoch));
|
self.mark_old_slots_as_dirty(storages, config.epoch_schedule.slots_per_epoch);
|
||||||
|
|
||||||
let (num_hash_scan_passes, bins_per_pass) = Self::bins_per_pass(self.num_hash_scan_passes);
|
let (num_hash_scan_passes, bins_per_pass) = Self::bins_per_pass(self.num_hash_scan_passes);
|
||||||
let use_bg_thread_pool = config.use_bg_thread_pool;
|
let use_bg_thread_pool = config.use_bg_thread_pool;
|
||||||
|
|
Loading…
Reference in New Issue