-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Backport Accounts Fixes #16838 and the test #17038 #19412
Conversation
* Use ReclaimResult::Default() instead of building subtypes * Add test to ensure account_db store and index are aligned
Codecov Report
@@ Coverage Diff @@
## v1.6 #19412 +/- ##
=========================================
- Coverage 82.2% 82.2% -0.1%
=========================================
Files 423 423
Lines 118114 118146 +32
=========================================
+ Hits 97197 97222 +25
- Misses 20917 20924 +7 |
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. Includes a few renames that are unnecessary, but ok.
I confirmed that this change, cherry-picked to 1.6 stops us accumulating old storages several million slots in the past. |
@@ -1181,31 +1181,30 @@ impl AccountsDb { | |||
// Reclaim older states of rooted accounts for AccountsDb bloat mitigation | |||
fn clean_old_rooted_accounts( | |||
&self, | |||
purges_in_root: Vec<Pubkey>, | |||
purges: Vec<Pubkey>, |
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.
These changes are just cosmetic, right? I can't find a logical difference. Is this PR truly for the test added?
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.
@lijunwangs see my comment to you below and this:
#16838
@@ -1599,7 +1598,9 @@ impl AccountsDb { | |||
// Don't reset from clean, since the pubkeys in those stores may need to be unref'ed | |||
// and those stores may be used for background hashing. | |||
let reset_accounts = false; | |||
self.handle_reclaims(&reclaims, None, false, None, reset_accounts); | |||
let mut reclaim_result = ReclaimResult::default(); | |||
let reclaim_result = Some(&mut reclaim_result); |
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.
@lijunwangs this is the point of the change. We pass Some() into handle_reclaims.
The test is the other functional change.
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.
Got it!
|
Problem
See #16838. Fix was not backported to 1.6
Summary of Changes
Backport #16838 and #17038
Fixes #