-
Notifications
You must be signed in to change notification settings - Fork 5.2k
HTTP2: change the default reset code from no error to internal error #42269
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
Conversation
Signed-off-by: wbpcode <[email protected]>
| codec_callbacks_->onCodecLowLevelReset(); | ||
| // TODO(wbpcode): this ensure that onCodecLowLevelReset is only called once. But | ||
| // we should replace this with a better design later. | ||
| // See https://github.com/envoyproxy/envoy/issues/42264 for why we need this. | ||
| if (!codec_low_level_reset_is_called_) { | ||
| codec_low_level_reset_is_called_ = true; | ||
| codec_callbacks_->onCodecLowLevelReset(); | ||
| } |
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.
This PR changed the default stream reset code and will enlarger the problem in the #42264. So, I made a quick work around to resolve problem here.
|
Compare to the change in the #40729, this PR removed all RemoteResetNoError related things. This is because:
|
Signed-off-by: wbpcode <[email protected]>
|
/retest |
|
At a high level this makes sense to me: send NO_ERROR only if the response is complete. I don't have the time to analyze the details on this so will defer to others on that. |
botengyao
left a comment
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.
Thanks @wbpcode for driving this! Here is a quick pass, and I will take an additional look this weekend, and the CI is legit for ogHTTP2 + ngHTTP2 + UHV.
/wait
Signed-off-by: wbpcode <[email protected]>
Signed-off-by: wbpcode <[email protected]>
… dev-fix-http2-error
Signed-off-by: wbpcode <[email protected]>
botengyao
left a comment
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.
thanks! lgtm overall module one concern.
/wait
| Runtime::runtimeFeatureEnabled("envoy.reloadable_features.reset_with_error"); | ||
| // We should not propagate UpstreamProtocolError to downstream as that indicates | ||
| // an error on the upstream connection and may have nothing to do with the downstream. | ||
| // But we do need to handle DownstreamProtocolError which indicates a protocol error | ||
| // on the downstream connection. |
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.
Emm, I understand the use of resetStream() is to downstream, but still think we need to propagate the ProtocolError if there are either DownstreamProtocolError or UpstreamProtocolError, and keep consistent as before. If you are strong with this, would an additional PR with a new runtime guard, saying that UpstreamProtocolError is rest with LocalRest be better?
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 reverted it and left a TODO there.
… dev-fix-http2-error
|
/retest |
Signed-off-by: wbpcode <[email protected]>
|
/retest |
botengyao
left a comment
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.
Thanks for improving this behavior @wbpcode.
Signed-off-by: code <[email protected]>
44990ec
|
/retest |
Commit Message: HTTP2: change the default reset code from no error to internal error
Additional Description:
This PR makes Envoy generate less NO_ERROR from the codec when there is a stream reset to close #36200.
https://httpwg.org/specs/rfc9113.html#RST_STREAM
https://httpwg.org/specs/rfc9113.html#ErrorCodes
Thanks so much for the great work from @botengyao in the #40729
Risk Level: mid.
Testing: unit + integration
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]