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

Create queue for network events when channel is full #704

Closed
austinabell opened this issue Sep 16, 2020 · 1 comment
Closed

Create queue for network events when channel is full #704

austinabell opened this issue Sep 16, 2020 · 1 comment
Labels
Network Libp2p and PubSub stuff Priority: 4 - Low Limited impact and can be implemented at any time Type: Enhancement

Comments

@austinabell
Copy link
Contributor

austinabell commented Sep 16, 2020

Issue summary

Currently, if the channel is full, the event is ignored with an error log to avoid stalling the libp2p task:

error!("network sender channel was full, ignoring event");

but it would be ideal to create some buffer (with something like VecDeque) when the channel is full to hold these pending events to send into the channel when the channel empties.

How the send from the queue is triggered can be done a few ways, but either just through a check at the start of the libp2p thread poll or as a future that is part of the select! are the ones that come to mind.

If this error is logged on other's ends we can also consider increasing the network event channel size (currently 50) to avoid this case, but I have yet to see the error log.

cc: @AshantiMutinta

Other information and links

@austinabell austinabell added Type: Enhancement Network Libp2p and PubSub stuff labels Sep 16, 2020
@dutterbutter dutterbutter added the Priority: 3 - Medium Nice-to-have, does not impede core functionality label Oct 19, 2020
@amerameen amerameen added Priority: 4 - Low Limited impact and can be implemented at any time and removed Priority: 3 - Medium Nice-to-have, does not impede core functionality labels Nov 2, 2020
@austinabell
Copy link
Contributor Author

No need for this because will just use unbounded channels in #922

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Network Libp2p and PubSub stuff Priority: 4 - Low Limited impact and can be implemented at any time Type: Enhancement
Projects
None yet
Development

No branches or pull requests

3 participants