-
Notifications
You must be signed in to change notification settings - Fork 311
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
disable read cache while populating stakes cache on load #482
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #482 +/- ##
=========================================
- Coverage 81.8% 81.8% -0.1%
=========================================
Files 842 842
Lines 228436 228442 +6
=========================================
- Hits 187063 187026 -37
- Misses 41373 41416 +43 |
Adding the disable_read_cache_updates field seems fine for this use case, but how about adding it as an explicit parameter to some load_account*() variant? Tx execution will likely want something like this too to implement #180, and there I don't think we can set a db-global bool |
This also sounds good to me. |
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.
It is a tradeoff. I like the simplicity of this change, which will be easy to backport.
Probably not a candidate to backport. v1.18 is rolling out to mnb very soon. So we should only be backporting critical bug fixes. More details in Discord: https://discord.com/channels/428295358100013066/439194979856809985/1222663250206789673. |
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.
Problem
stakes cache reads tons of accounts. These fill up the read cache. We then spend time evicting all these accounts, which hurts performance of startup and tx processing.
Summary of Changes
skip populating the read cache while loading stake accounts.
Fixes #