Skip to content

Commit

Permalink
don't log when there is no work to do for combining ancient slots (#2…
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwashington authored Aug 13, 2022
1 parent bdce208 commit 0ca8239
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions runtime/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3731,14 +3731,7 @@ impl AccountsDb {
let mut current_ancient = None;
let mut dropped_roots = vec![];

if let Some(first_slot) = sorted_slots.first() {
info!(
"ancient_append_vec: combine_ancient_slots first slot: {}, num_roots: {}",
first_slot,
sorted_slots.len()
);
}

let len = sorted_slots.len();
for slot in sorted_slots {
let old_storages =
match self.get_storages_to_move_to_ancient_append_vec(slot, &mut current_ancient) {
Expand All @@ -3751,7 +3744,11 @@ impl AccountsDb {

if guard.is_none() {
// we are now doing interesting work in squashing ancient
guard = Some(self.active_stats.activate(ActiveStatItem::SquashAncient))
guard = Some(self.active_stats.activate(ActiveStatItem::SquashAncient));
info!(
"ancient_append_vec: combine_ancient_slots first slot: {}, num_roots: {}",
slot, len
);
}

// this code is copied from shrink. I would like to combine it into a helper function, but the borrow checker has defeated my efforts so far.
Expand Down

0 comments on commit 0ca8239

Please sign in to comment.