move timer after early exit (#33732)

Co-authored-by: HaoranYi <haoran.yi@solana.com>
This commit is contained in:
HaoranYi 2023-10-17 15:20:29 -05:00 committed by GitHub
parent 2c6cc4dd7d
commit 673a38c892
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -4554,10 +4554,11 @@ impl AccountsDb {
/// Combine all account data from storages in 'sorted_slots' into ancient append vecs.
/// This keeps us from accumulating append vecs for each slot older than an epoch.
fn combine_ancient_slots(&self, sorted_slots: Vec<Slot>, can_randomly_shrink: bool) {
let mut total = Measure::start("combine_ancient_slots");
if sorted_slots.is_empty() {
return;
}
let mut total = Measure::start("combine_ancient_slots");
let mut guard = None;
// the ancient append vec currently being written to