-
Notifications
You must be signed in to change notification settings - Fork 656
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
HappyEyeballs should tolerate uncancellable tasks. #191
HappyEyeballs should tolerate uncancellable tasks. #191
Conversation
channels.finishAll() | ||
} | ||
|
||
let (eyeballer, resolver, loop) = buildEyeballer(host: "example.com", port: 80, connectTimeout: .milliseconds(250)) { |
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.
@Lukasa maybe we just want to use swiftnio.io
for the hostname everywhere tho ?
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 think it doesn't really matter?
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.
Yeah sure it not matters in this test but if we have a domain name we can also just use it and not refer to some random ones. Feel free to ignore tho, I don’t say we need to do it but I think knit is a good thing in general
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.
Actually, an example.com
is just OK for this purpose, see rfc2606.
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.
@vlm TIL ... Thanks!
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.
👍 makes sense!
@Lukasa can you rebase and merge ? |
a529bd5
to
20a1dbd
Compare
Motivation: The HappyEyeballs state machine incorrectly assumed that it would always be able to cancel any scheduled task that would execute on the event loop that the state machine itself was running on. This is not accurate: if the scheduled task is scheduled to execute at roughly the same time as another callback into the state machine then it may be uncancellable. Modifications: Allowed the three scheduled tasks (connect timeout, connect delay, and resolver delay) to fire in completed. Result: No fatalErrors in window conditions under high load
20a1dbd
to
02db81e
Compare
@swift-nio-bot test this please |
Motivation: When a window update event is received in the stream channel we notify the inbound window manager. Doing so may emit a WINDOW_UPDATE frame to indicate the remote may send us more DATA. However, this happens even if there are inbound frames waiting to be delivered to the channel. This may lead to the remote sending us more DATA which we have to buffer until it is read. Modifications: - Update the inbound window manager to track the number of bytes buffered in the stream channel - Account for buffered bytes when receiving a new window size event - Possibly emit WINDOW_UPDATE after unbuffering inbound frames into the stream channel's pipeline Result: The timing of WINDOW_UPDATE frames is better aligned with when frames are actually read in a stream.
Motivation: Docs are generated by and hosted on the Swift Package Index. We no longer need the script to generate docs via Jazzy. Modifications: - Remove the generate_docs script - Remove Jazzy from the Dockerfile but keep Ruby; it's used for generating test manifests. - Remove SwiftFormat from the Dockerfile; we don't use it. Result: Fewer unused things.
Motivation:
The HappyEyeballs state machine incorrectly assumed that it would always
be able to cancel any scheduled task that would execute on the event loop
that the state machine itself was running on. This is not accurate: if
the scheduled task is scheduled to execute at roughly the same time as
another callback into the state machine then it may be uncancellable.
Modifications:
Allowed the three scheduled tasks (connect timeout, connect delay, and
resolver delay) to fire in completed.
Result:
No fatalErrors in window conditions under high load
Resolves #187.