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

Removes synchronous event handlers between peer manager to gossip service #1565

Merged
merged 2 commits into from
Jun 15, 2022

Conversation

luca-moser
Copy link
Member

In order to allow the p2p.Manager to continue execution without blocking on gossip.Service channels being free, the glue code (the event handlers) for p2p.Manager to gossip.Service are now submitted to a worker pool which is instantiated by the gossip.Service.

Before there was a chance that the event handlers would get stuck sending into the gossip.Service channels, as the gossip.Service itself was sending into a p2p.Manager channel, thus deadlocking both components. The intention was to circumvent this by having buffered channels but given the capacity of 10, this situation could still occur.

@luca-moser luca-moser added this to the HORNET-v2.0.0 milestone Jun 15, 2022
@luca-moser luca-moser linked an issue Jun 15, 2022 that may be closed by this pull request
@luca-moser luca-moser requested a review from muXxer June 15, 2022 17:25
@muXxer muXxer merged commit 5553173 into develop Jun 15, 2022
@muXxer muXxer deleted the fix/gossip-deadlock branch June 15, 2022 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gossip Service deadlocks
2 participants