-
Notifications
You must be signed in to change notification settings - Fork 835
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
notifications/libp2p: Terminate the outbound notification substream on std::io::Errors
#7724
base: master
Are you sure you want to change the base?
Conversation
stream Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
(unexpected eof) Signed-off-by: Alexandru Vasile <[email protected]>
warn!( | ||
target: "sub-libp2p", | ||
"Error while reading from `NotificationsOutSubstream` peer={:?} error={error:?}", | ||
this.peer_id | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would make a release image and bake this PR in our stack for a bit. The Unexpected incoming data
spuriously reproduced yesterday, I would like to gain a bit more data on this before downgrading the io::error
warning into a debug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are programming errors and not something the operator can fix. These should be debug
.
Signed-off-by: Alexandru Vasile <[email protected]>
All GitHub workflows were cancelled due to failure one of the required jobs. |
std::io::Errors
std::io::Errors
Signed-off-by: Alexandru Vasile <[email protected]>
… into lexnv/substream-poll-unexpected
substrate/client/network/src/protocol/notifications/upgrade/notifications.rs
Outdated
Show resolved
Hide resolved
Signed-off-by: Alexandru Vasile <[email protected]>
This PR handles a case where we called the
poll_next
on an outbound substream notification to check if the stream is closed. It is entirely possible that thepoll_next
would return anio::error
, for example end of file.This PR ensures that we make the distinction between unexpected incoming data, and error originated from
poll_next
.While at it, the bulk of the PR change propagates the PeerID from the network behavior, through the notification handler, to the notification outbound stream for logging purposes.
cc @paritytech/networking
Part of: #7722