This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Repository navigation
[release/3.0] HTTP2: Rework shutdown handling - #39775
Merged
Merged
Conversation
added 7 commits
July 25, 2019 10:20
…ls properly when response is not read to end
|
Approved - stress. Have we hammered enough on this using the stress app in master? @eiriktsarpalis any concerns about putting this into 3.0 today? |
Author
|
I ran stress on this for about an hour locally, against http.sys. Zero failures, which is much better than previous results. |
|
Sounds good to me. Please go ahead. |
stephentoub
approved these changes
Jul 25, 2019
|
Friendly reminder: please remember to squash commits when merging in the future (using the "Squash and merge" button on GitHub). Thanks. |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #39630
Fixes #39624
Incomplete attempt to fix #39586
Fixes #39461
Fixes #39460
Fixes #39458
Fixes #39459
Fixes #39404
Port of #39638 from master to release/3.0.
Rework shutdown handling to be reliable and consistent, for both streams and connections.
Each Http2Stream has to complete both request and response before shutting down, at which time it will remove itself from the stream dictionary and clean up associated state.
The request body and response body can each be cancelled, and these are now cancelled at appropriate times (e.g. Dispose on response stream before reading to end).
The behavior of early non-success status codes is changed to not cancel the request body. This matches HTTP/1.1 behavior.
The connection is now shut down only when all streams are removed from the dictionary. Receiving EndStream or RST_STREAM does not automatically remove the stream; instead we let the stream manage its own shutdown and then remove it from the dictionary.
Add relevant tests, fix up some existing tests, and remove one bogus test.
I haven't run stress tests on this yet -- I wanted to get the review out first. Will report when I have stress results.
@danmosemsft
Note: #39745 will need to go into release/3.0 too. It's currently blocked on eng system issues. If these get resolved, I will add to this PR. Can you approve that fix too?