Skip to content

drop msg if sync_sender buffer is full (do not close peer connection)#3164

Merged
antiochp merged 1 commit into
mimblewimble:masterfrom
antiochp:msg_queue_drop_msgs
Dec 10, 2019
Merged

drop msg if sync_sender buffer is full (do not close peer connection)#3164
antiochp merged 1 commit into
mimblewimble:masterfrom
antiochp:msg_queue_drop_msgs

Conversation

@antiochp
Copy link
Copy Markdown
Member

Resolves #3162.

We do not necessarily want to treat a "sending on a full channel" as an error serious enough to warrant closing the peer connection.
There are various scenarios where the sync_sender buffer can fill up with "yet to be sent" msgs. One example is during a long running txhashset download.

This PR splits out the error handling during try_send. A Disconnected will propagate up and cause the caller to close the peer connection. A Full will simply cause us to drop the msg and continue.

The assumption here is that if the buffer filling up is a symptom of a more serious issue with the peer connection this will be handled at the peer level, closing the connection as necessary. It is not the responsibility of the msg queue to identify and handle this.

Comment thread p2p/src/conn.rs Outdated
@antiochp antiochp added this to the 3.0.0 milestone Dec 10, 2019
@antiochp antiochp force-pushed the msg_queue_drop_msgs branch from d439ee3 to 386bd02 Compare December 10, 2019 18:58
@antiochp antiochp force-pushed the msg_queue_drop_msgs branch from 386bd02 to a6b8edc Compare December 10, 2019 19:22
@antiochp antiochp merged commit bde1977 into mimblewimble:master Dec 10, 2019
@antiochp antiochp deleted the msg_queue_drop_msgs branch December 10, 2019 20:06
@antiochp antiochp mentioned this pull request Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"txhashset save to file fail" with corresponding "sending on a full channel"

2 participants