Skip to content

Commit

Permalink
skip packing multi ref ancient slots until sufficient normal slots ar…
Browse files Browse the repository at this point in the history
…e packed (#1583)

* don't pack multi ref slots until safe

* sub 1 to get math perfect
  • Loading branch information
jeffwashington authored Jun 5, 2024
1 parent 0bf34e5 commit 478f190
Show file tree
Hide file tree
Showing 2 changed files with 329 additions and 137 deletions.
6 changes: 6 additions & 0 deletions accounts-db/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1942,6 +1942,7 @@ pub(crate) struct ShrinkAncientStats {
pub(crate) slots_considered: AtomicU64,
pub(crate) ancient_scanned: AtomicU64,
pub(crate) bytes_ancient_created: AtomicU64,
pub(crate) many_ref_slots_skipped: AtomicU64,
}

#[derive(Debug, Default)]
Expand Down Expand Up @@ -2231,6 +2232,11 @@ impl ShrinkAncientStats {
self.bytes_ancient_created.swap(0, Ordering::Relaxed) as i64,
i64
),
(
"many_ref_slots_skipped",
self.many_ref_slots_skipped.swap(0, Ordering::Relaxed),
i64
),
);
}
}
Expand Down
Loading

0 comments on commit 478f190

Please sign in to comment.