-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
move go-libp2p-transport-upgrader here #1463
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… queued up Otherwise, we'll have an annoying saw-tooth pattern where we'll accept a bunch of connections, set them up in parallel, and then wait until we pass them all back up to the swarm before accepting any more. This commit allows us to queue up 16 ready connections before ceasing to accept any new connections. We'll still probably have a saw-tooth pattern under heavy load but it should be less pronounced (and we can improve the situation by upping the queue size.
Also, add a context canceled check to the loop just in case (accept could, if buggy, return temporary errors after it's closed).
keep accepting and negotiating connections until we have 16 ready and queued up
wait after accepting a new connection if the queue is full
fix off-by-one error in the threshold
add tests for the listener
It could have been sitting around for a while.
annotate errors
may be related to ipfs/kubo#6197 (but I can't find one)
Otherwise, setting global variables races with running goroutines.
improve correctness of closing connections on failure
dep: import go-libp2p-mplex into the libp2p org
chore: update go-log
use the new network.ConnStats
fix flaky TestAcceptQueueBacklogged test
make the accept timeout configurable, stop using transport.AcceptTimeout
reset the temporary error catcher delay after successful accept
use the new transport.Upgrader interface
rename the package to upgrader
use the Resource Manager
Removes the very ugly contract of "if you know the peer you have set it" and makes the code robust against upstream bugz.
Fix nil peer scope issues
marten-seemann
force-pushed
the
merge-upgrader
branch
from
April 26, 2022 23:46
db4851d
to
9dc18ed
Compare
Stebalien
approved these changes
Apr 27, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Part of #1187.