This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
brooksprumo
reviewed
Oct 19, 2023
Co-authored-by: Brooks <[email protected]>
HaoranYi
reviewed
Oct 19, 2023
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?
HaoranYi
approved these changes
Oct 19, 2023
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 #