-
Notifications
You must be signed in to change notification settings - Fork 261
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
Uses 0
for write version at startup for geyser
#721
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #721 +/- ##
=======================================
Coverage 81.9% 81.9%
=======================================
Files 851 851
Lines 230709 230710 +1
=======================================
+ Hits 189003 189045 +42
+ Misses 41706 41665 -41 |
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
@lijunwangs Added you as a reviewer here to double check this'll be ok for geyser. |
Ah, just realized that this PR does not change behavior at all. Prior to this function ( agave/accounts-db/src/accounts_db/geyser_plugin_utils.rs Lines 124 to 135 in 9706a64
I've updated the PR description to mention this. And by setting |
Closing. This has been obviated by #979. |
Problem
We're trying to remove write version everywhere. The only remaining use of write version is for geyser. As an incremental step, we'd like to remove the
write_version()
method onStoredAccountMeta
. Both to prevent new uses, and also because Tiered Storage does not support getting/setting a write version at all.At startup, when loading from a snapshot, geyser is notified of all accounts. Currently this uses the write version from each account. The observation is that at startup we know (1) there is only a single version of each account, and (2) there are no concurrent slots/banks getting replayed. This means we'll never have concurrent updates to the same account and would need to disambiguate between them which is newer. This allows us to set the write version to
0
.Summary of Changes
Use
0
for write version at startup.Also note that we are manually setting the write version to 0 on the StoredAccountMeta just before
accountinfo_from_stored_account_meta()
is called:agave/accounts-db/src/accounts_db/geyser_plugin_utils.rs
Lines 124 to 135 in 9706a64
So the current behavior is unchanged with this PR.
Related to #702