-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add ancient append vec test #33762
add ancient append vec test #33762
Conversation
Codecov Report
@@ Coverage Diff @@
## master #33762 +/- ##
========================================
Coverage 81.8% 81.8%
========================================
Files 806 806
Lines 217905 217988 +83
========================================
+ Hits 178278 178380 +102
+ Misses 39627 39608 -19 |
Co-authored-by: Brooks <brooks@prumo.org>
accounts_shrunk_same_slot.first().unwrap().pubkey(), | ||
pk_with_2_refs | ||
); | ||
assert_eq!( |
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.
So account_with_1_ref
shouldn't exist in the new_storage, right?
Can we add an assert for this?
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.
As a result, if we don't distinguish different categories of accounts where ref_count > 1, we'll have many slots which can't be packed and moved.
Summary of Changes
Add a test to prepare to distinguish accounts with refcount > 1 where there is an alive index entry with a higher slot #. Soon, accounts will be treated differently if refcount > 1 depending on if this slot's index entry for the pubkey is higher or lower than other alive entries.
This new test is very similar to the existing
test_calc_accounts_to_combine_opposite
. In the next pr, that test will change to test the case where we have 2 refs, and 1 is from an older slot.Fixes #