-
Notifications
You must be signed in to change notification settings - Fork 741
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
Fix edge case where state sync is not triggered #5635
Merged
dmitry-markin
merged 6 commits into
paritytech:master
from
liuchengxu:fix-state-sync-lost
Sep 10, 2024
Merged
Fix edge case where state sync is not triggered #5635
dmitry-markin
merged 6 commits into
paritytech:master
from
liuchengxu:fix-state-sync-lost
Sep 10, 2024
Conversation
This file contains 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
Pure refactoring, zero logical changes.
liuchengxu
force-pushed
the
fix-state-sync-lost
branch
from
September 7, 2024 14:58
cbaa95b
to
ddfcf2d
Compare
There is an edge case where the finalized block notification is received, but the conditions required to initiate the state sync are not fully met. In such cases, state sync would fail to start as expected and remain stalled. This fixes it by storing the pending attempt and trying to start it later.
liuchengxu
force-pushed
the
fix-state-sync-lost
branch
from
September 7, 2024 15:06
ddfcf2d
to
3672c34
Compare
dmitry-markin
approved these changes
Sep 9, 2024
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.
Nicely done, thank you!
dmitry-markin
added
T0-node
This PR/Issue is related to the topic “node”.
I2-bug
The node fails to follow expected behavior.
labels
Sep 9, 2024
Co-authored-by: Dmitry Markin <[email protected]>
bkchr
approved these changes
Sep 10, 2024
auto-merge was automatically disabled
September 10, 2024 08:11
Head branch was pushed to by a user without write access
@bkchr Please click the button again, fmt wasn't good in the applied suggestion :( |
Merged
via the queue into
paritytech:master
with commit Sep 10, 2024
8236718
201 of 203 checks passed
nazar-pc
pushed a commit
to autonomys/polkadot-sdk
that referenced
this pull request
Sep 27, 2024
This PR addresses an issue where state sync may fail to start if the conditions required for its initiation are not met when a finalized block notification is received. `pending_state_sync_attempt` is introduced to trigger the state sync later when the conditions are satisfied. This issue was spotted when I worked on paritytech#5406, specifically, `queue_blocks` was not empty when the finalized block notification was received, and then the state sync was stalled. cc @dmitry-markin --------- Co-authored-by: Dmitry Markin <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> (cherry picked from commit 8236718)
1 task
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.
This PR addresses an issue where state sync may fail to start if the conditions required for its initiation are not met when a finalized block notification is received.
pending_state_sync_attempt
is introduced to trigger the state sync later when the conditions are satisfied.This issue was spotted when I worked on #5406, specifically,
queue_blocks
was not empty when the finalized block notification was received, and then the state sync was stalled. cc @dmitry-markin