-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Skip shrink until startup verification is complete #34209
Conversation
Backports to the stable branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. |
Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #34209 +/- ##
=========================================
- Coverage 81.9% 81.9% -0.1%
=========================================
Files 819 819
Lines 219425 219427 +2
=========================================
- Hits 179854 179842 -12
- Misses 39571 39585 +14 |
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
bank.shrink_ancient_slots(); | ||
// See justification below for why we skip 'shrink' here. | ||
if bank.is_startup_verification_complete() { | ||
bank.shrink_ancient_slots(); |
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.
nit: Can we add a log when we skip shrink due to startup verification?
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.
I think this may cause lots of messages in the log. Let me test it out and report back.
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.
I'm going to merge this PR for now so that the backports can get started. I'll make sure to test out how logs look, and then open up a PR as needed.
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. ty
(cherry picked from commit da9fad8) # Conflicts: # runtime/src/accounts_background_service.rs
(cherry picked from commit da9fad8)
Problem
Please refer to #34180.
Summary of Changes
Skip 'shrink' until after startup verification has completed.
This implementation was chosen instead of getting all the snapshot storages as passing them into
verify_accounts_hash()
so that the fix would be the least invasive. As this will be more of an issue once IncrementalAccountsHash is enabled (because we do two accounts hash calculations at startup), we want to backport this fix all the way to v1.16, and thus a minimal PR is preferred.Skipping shrink until the startup verification is complete is also safe. We used to pause everything until startup verification was complete, so reigning in one thing should be fine. (Note this will not affect correctness of the foreground transaction processing at all.)
Fixes #34180