go/worker/storage/committee: Fix teardown#6444
Merged
martintomazic merged 1 commit intomasterfrom Feb 10, 2026
Merged
Conversation
✅ Deploy Preview for oasisprotocol-oasis-core canceled.
|
martintomazic
commented
Jan 18, 2026
c5b803a to
1eeb529
Compare
peternose
reviewed
Jan 20, 2026
Collaborator
Yes, any error returned in the last |
1eeb529 to
3de9287
Compare
3de9287 to
d6d81b2
Compare
kostko
approved these changes
Feb 9, 2026
Previously the fetch pool was closed first, which caused doneCh to never be closed, which cause wg.Wait to never finish. There is no need for the doneCh as fetchPool.Stop already ensures all worker threads have stopped, and the queue of pending tasks is emptied. In other words we are guranteed no side effects.
d6d81b2 to
9663948
Compare
peternose
approved these changes
Feb 10, 2026
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.
https://github.com/oasisprotocol/internal-ops/issues/1317#issuecomment-3765815368 showed that in case of corrupted storage, our worker teardown might get stuck.
How to test
Start your node with paratime configured and return a dummy error here.
Prior to this change indexer would continue, whilst storage worker would get stuck at teardown.
It would be nice to have a test for this, but we would need to completely refactor storage worker first. Mainly all the state DB, p2p and other stuff should be passed as parameters, so that errors can be mocked in the "integration" tests.