-
Notifications
You must be signed in to change notification settings - Fork 937
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
Reset the stream when a response is completed before its corresponding response #6108
Conversation
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.
It makes sense regarding the modifications made on the client side.
Server-side question) It could be unsafe to indefinitely wait for the client to send EOS in the half-closed (local) state.
Would it be reasonable to send RST_STREAM on the server side after requestAutoAbortDelay
if the request remains open?
final Http2Error error; | ||
if (Exceptions.isStreamCancelling(cause)) { | ||
if (Exceptions.isStreamCancelling(cause) || cause instanceof ResponseCompleteException) { |
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.
nit: cause instanceof ResponseCompleteException
should be cheaper and is more likely to be called.
if (Exceptions.isStreamCancelling(cause) || cause instanceof ResponseCompleteException) { | |
if (cause instanceof ResponseCompleteException || Exceptions.isStreamCancelling(cause)) { |
/cc @minwoox Maybe he has some thoughts on that. |
That makes sense. 👍 |
If you have an idea to handle this, feel free to do so. I don't think this issue is trivial, and I think some more time is needed to analyze/fix this issue. |
I didn't take a look at the problem in detail. It seems you have analyzed the issue more than I have, so I would like to ask you to handle it. |
Let's handle the server-side issue separately. Thanks! |
…g response (#6108) Motivation: The motivation for this PR is better stated in #6104. Modifications: - Modified so that when a request is aborted with a `ResponseCompleteException`, the stream is reset with `CANCEL` for http2 or the connection is closed for http1. Result: - Connections do not hold references on automatically aborted requests, resulting in less memory pressure. <!-- Visit this URL to learn more about how to write a pull request description: https://armeria.dev/community/developer-guide#how-to-write-pull-request-description -->
…g response (#6108) Motivation: The motivation for this PR is better stated in #6104. Modifications: - Modified so that when a request is aborted with a `ResponseCompleteException`, the stream is reset with `CANCEL` for http2 or the connection is closed for http1. Result: - Connections do not hold references on automatically aborted requests, resulting in less memory pressure. <!-- Visit this URL to learn more about how to write a pull request description: https://armeria.dev/community/developer-guide#how-to-write-pull-request-description -->
Motivation:
The motivation for this PR is better stated in #6104.
Modifications:
ResponseCompleteException
, the stream is reset withCANCEL
for http2 or the connection is closed for http1.Result: