-
Notifications
You must be signed in to change notification settings - Fork 4.6k
ancient: add many_refs_this_is_newest_alive #33741
Conversation
478921b
to
f056c58
Compare
Codecov Report
@@ Coverage Diff @@
## master #33741 +/- ##
=========================================
- Coverage 81.8% 81.8% -0.1%
=========================================
Files 806 806
Lines 218058 218015 -43
=========================================
- Hits 178415 178367 -48
- Misses 39643 39648 +5 |
} | ||
fn with_capacity(capacity: usize, slot: Slot) -> Self { | ||
Self { | ||
one_ref: AliveAccounts::with_capacity(capacity, slot), | ||
many_refs: AliveAccounts::with_capacity(capacity, slot), | ||
many_refs_this_is_newest_alive: AliveAccounts::with_capacity(0, slot), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expectation is there are few accounts with ref_count > 1, so set capacity to 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall. Some comments/questions/nits. Also, can the PR's title be updated since it's not longer a work in progress (I assume)?
rebased to fix merge errors with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Problem
When we disable rewrites, we will accumulate old append vecs & slots. We use ancient append vec packing to combine those. There exist many accounts which will remain in their dead state indefinitely.
Summary of Changes
Allow accounts which are alive and alive at the newest slot to still get packed together and move slots.
Fixes #