Add load_account_with() API to allow a callback to control whether to insert the loaded account into read_cache.#1350
Merged
mergify[bot] merged 3 commits intoanza-xyz:masterfrom May 16, 2024
Conversation
Lichtso
reviewed
May 14, 2024
| self.read_only_accounts_cache | ||
| .store(*pubkey, slot, account.clone()); | ||
| } | ||
| Some((account, slot)) |
There was a problem hiding this comment.
Looks good. This should work (for the new index structure of the program cache).
There was a problem hiding this comment.
refactor/last_written_slot_in_program_loading is where it will be used. Once this PR merges I can rebase that branch and once that is merged @HaoranYi could rebase #1157. That would be one way to make the two change sets compatible.
brooksprumo
reviewed
May 14, 2024
brooksprumo
reviewed
May 14, 2024
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1350 +/- ##
========================================
Coverage 82.1% 82.1%
========================================
Files 899 899
Lines 237263 237346 +83
========================================
+ Hits 194810 194915 +105
+ Misses 42453 42431 -22 |
|
Anything else holding this PR back? Otherwise I would say fix the typo, we reapprove and merge. |
Author
|
Fix a typo. |
brooksprumo
approved these changes
May 16, 2024
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
#1157
Split the accounts-db related changes from #1157. The accounts-db changes don't depend on #1157. The new API can be used for other cases than #1157. It also makes the code review easier.
Summary of Changes
load_with(), which takes a callback to indicate whether to insert the loaded account into read_cache.Fixes #