Skip to content
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

v1.17: blockstore: relax parent slot meta check for clear_unconfirmed_slot #67

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

AshwinSekar
Copy link

@AshwinSekar AshwinSekar commented Mar 4, 2024

backport of the relevant parts in solana-labs#35124

Comment on lines 165 to 171
} else {
error!(
"Parent slot meta {} for child {} is missing or cleaned up.
Falling back to orphan repair to remedy the situation",
parent_slot, slot
);
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a pretty large BP to consider for v1.17 & v1.18; most of the change was a refactor to clean things up. I think we could get away with BP'ing much less, namely, just this bit to print an error instead of doing the following expect that is currently in the v1.17/18 branches:

.expect("Unconfirmed slot should have had parent slot set");

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed, i think we can just error instead of expect. the atomic write can wait for master

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. And thinking out loud, suppose that C is the child of P. If we purge C but can't find P's meta, we'll repopulate a meta for P when C is repaired / reinserted

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep that's correct

@AshwinSekar AshwinSekar changed the title v1.17: blockstore: atomize slot clearing, relax parent slot meta check v1.17: blockstore: relax parent slot meta check Mar 4, 2024
@AshwinSekar AshwinSekar changed the title v1.17: blockstore: relax parent slot meta check v1.17: blockstore: relax parent slot meta check for clear_unconfirmed_slot Mar 4, 2024
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 85.71429% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 81.6%. Comparing base (bc3ab0f) to head (8a7f7bf).

Additional details and impacted files
@@           Coverage Diff           @@
##            v1.17      #67   +/-   ##
=======================================
  Coverage    81.6%    81.6%           
=======================================
  Files         806      806           
  Lines      219092   219097    +5     
=======================================
+ Hits       178852   178916   +64     
+ Misses      40240    40181   -59     

@AshwinSekar AshwinSekar requested a review from steviez March 9, 2024 04:13
Copy link

@steviez steviez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this one is good for v1.17 as well, but I think it would be good to get additional buy in before pushing. Again, the reason being is that we're relaxing a panic to an error!() message in a scenario that we might be able to recover from.

In the v1.18 BP, Trent did call out that this diff is significantly different than the original PR. That is probably fair, and to echo a comment from Ashwin, we probably could have done the panic-to-error demotion in one PR and refactor in subsequent PR.

Agree with the general sentiment but here we are; the diff itself is pretty contained and easy to reason about so I don't think we have to abort this one solely for that reason.

For completeness, gonna add Trent and Will to the review

@steviez steviez requested review from t-nelson and willhickey March 9, 2024 05:45
Copy link

@willhickey willhickey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved for backport to stable

@AshwinSekar AshwinSekar merged commit d06a0a4 into anza-xyz:v1.17 Mar 21, 2024
33 checks passed
@HaoranYi HaoranYi mentioned this pull request Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants