-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Make Blockstore populate TransactionStatusIndex entries #33756
Conversation
A previous change removed logic that populated the TransactionStatusIndex entries at each of the legacy primary index keys (0 and 1). While these entries will not be read or written in the future, these entries are necessary for backwards compatibility. Namely, branches <= v1.17 expect these entries to be present and .unwrap()'s could fail if they are not. So, add the initialization of these entries back into Blockstore logic. We can remove initialization of these entries once our stable and beta branches are both versions that do not expect these entries to be present (should be v1.18).
2c09538
to
2cf244b
Compare
@@ -2152,7 +2163,7 @@ impl Blockstore { | |||
highest_primary_index_slot = Some(meta.max_slot); | |||
} | |||
} | |||
if highest_primary_index_slot.is_some() { | |||
if highest_primary_index_slot.is_some_and(|slot| slot != 0) { |
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.
This feels a little dirty but couldn't think of a better way to do it.
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.
Yeah, really my fault for all the clean_slot_0
stuff, though. This wfm!
Codecov Report
@@ Coverage Diff @@
## master #33756 +/- ##
=======================================
Coverage 81.8% 81.8%
=======================================
Files 806 806
Lines 217913 217919 +6
=======================================
+ Hits 178286 178295 +9
+ Misses 39627 39624 -3 |
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.
Thank you, and sorry for not catching this in review!
@@ -2152,7 +2163,7 @@ impl Blockstore { | |||
highest_primary_index_slot = Some(meta.max_slot); | |||
} | |||
} | |||
if highest_primary_index_slot.is_some() { | |||
if highest_primary_index_slot.is_some_and(|slot| slot != 0) { |
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.
Yeah, really my fault for all the clean_slot_0
stuff, though. This wfm!
Problem
I encountered this issue originally by:
Blockstore
with master (which does not insert these entries) ANDBlockstore
withsolana-ledger-tool
which opens in Secondary (read-only mode)