Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
swarm/connection: Enforce limit on inbound substreams via
StreamMuxer
#2861swarm/connection: Enforce limit on inbound substreams via
StreamMuxer
#2861Changes from 42 commits
79ce63f
b829642
7182fd6
7190a79
f689617
4d9fa5b
1af9ba3
27274c8
2c3a606
772b775
6359137
bb930c4
d8d8165
a98415f
bbf7070
8fea3a7
65a06d2
91370a9
0621961
9197de0
82d3bd3
e677455
6b98c50
890cecd
44e9163
649021c
9ca11b0
34ef653
44c2e36
0ec5a58
1ff710d
ce4d9a7
e0ba9ba
9ea9ad8
a2f220a
e7cfb46
ee686ed
9bfa0cb
ee61244
dcedb4e
36f69ea
a2c2502
a25abeb
b8ad471
0cb8a87
1943c66
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
If I am not mistaken, the additional buffer of 25 streams increases the overall number of possible inflight inbound streams, correct? In other words, while we previously only supported
max_negotiating_inbound_streams
before dropping streams, we now allow up tomax_negotiating_inbound_streams + 25
.Is this correct?
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.
Yep, that sounds correct to me! Like I said, this number is completely arbitrary and we can change it to something else :)
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.
Just want to make sure we are making an informed decision here. Instead of tail dropping, we could as well do head dropping.
I would have to put more thoughts into this before having an opinion. This does maintain the status quo, thus we can consider it a non-change.
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.
With this change, the timeout for opening a new stream already begins as the request is queued. I believe head dropping would negatively affect the number of successfully negotiated streams because we might drop a stream that was about to be processed by the local node. A dropped stream will trigger a
ConnectionHandler::inject_dial_upgrade_error
with the provided "open info" on the remote node.In a scenario where a node opens 3 streams that are all pending in this buffer, I think it may be confusing if stream 1 fails but 2 and 3 succeed. It feels more natural to process this in FIFO order.