Open
Conversation
Fixed order of closing components. Removed unnecessary logging. Made Close() methods safer. Fixed context in pull sync component.
478bfab to
7bed9a2
Compare
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.
Fixed order of closing components. Removed unnecessary logging. Made Close() methods safer. Fixed context in pull sync component.
Checklist
Description
Context: see the linked issue
What was done:
Fixed the shutdown order of storages. Previously,
StateStorewas closed beforeLocalStore.LocalStoreusesBatchStore, which depends onStateStore. During shutdown or in-flight work,BatchStorecould accessStateStore, causing failedPut/Getoperations, with a risk of incomplete flush and inconsistent local state.Fixed a context handling issue in the pull sync component. Upon receiving a shutdown signal, the component waited 10 seconds to allow its sub-goroutines to terminate gracefully. However, the sub-goroutines did not receive the context cancellation signal.
Added logs to track how long each component takes to shut down.
Removed warning logs in
libp2pfor context cancellation when the node is shutting down, to avoid log noise.Open API Spec Version Changes (if applicable)
Motivation and Context (Optional)
Related Issue (Optional)
#5397
Screenshots (if appropriate):
AI Disclosure