Skip to content

Commit

Permalink
only mark status as shrinking when we have something to shrink (#2360)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwashington authored Aug 2, 2024
1 parent ee290ef commit eae4987
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion accounts-db/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4818,7 +4818,8 @@ impl AccountsDb {
return 0;
}

let _guard = self.active_stats.activate(ActiveStatItem::Shrink);
let _guard = (!shrink_slots.is_empty())
.then_some(|| self.active_stats.activate(ActiveStatItem::Shrink));

let mut measure_shrink_all_candidates = Measure::start("shrink_all_candidate_slots-ms");
let num_candidates = shrink_slots.len();
Expand Down

0 comments on commit eae4987

Please sign in to comment.