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

resolve race in closing sync segments channel #1201

Merged
merged 2 commits into from
Jun 4, 2024
Merged

resolve race in closing sync segments channel #1201

merged 2 commits into from
Jun 4, 2024

Conversation

darioush
Copy link
Collaborator

@darioush darioush commented Jun 3, 2024

Why this should be merged

Fixes #1200

How this works

Closes the sync channel after the last storage trie has finished (or if there is no storage tries).
This avoids writing to a closed channel when a storage trie splits into segments:
https://github.com/ava-labs/subnet-evm/blob/master/sync/statesync/trie_segments.go#L311-L313

but in the existing behavior the storageTrieProducer could have previously closed the channel.

How this was tested

CI

How is this documented

N/A

@darioush darioush marked this pull request as ready for review June 3, 2024 18:44
@darioush darioush requested a review from ceyonur as a code owner June 3, 2024 18:44
@darioush darioush changed the title resolve race in closing sync channel resolve race in closing sync segments channel Jun 3, 2024
@darioush darioush merged commit 22fc7cc into master Jun 4, 2024
12 checks passed
@darioush darioush deleted the sync-race branch June 4, 2024 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Panic while syncing
2 participants