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.
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
Pausable chunked HTTP responses #104851
Pausable chunked HTTP responses #104851
Changes from 6 commits
c92a7ec
f7250b8
ff24f3c
e957bc7
44a4482
18e65e2
1fd16fb
33fa0cd
1d927ca
b0e3ff8
708fa52
4954c8e
aa52c18
43584be
2022d7a
ffd6cac
1777bc5
befb016
3fab7ce
bbcbf5a
7b896e0
0b91c7f
d5e4031
751ce75
cf74253
38d55af
048194d
6fac79d
64ad627
e4a34ac
b3b7399
d4d1401
221b5b6
b01bda4
39b71dd
23c1a1f
30795e0
4570c92
0d923f4
ee1a4a4
a2c385e
344f75c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Large diffs are not rendered by default.
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 wonder whether similar treatment (#105306) is needed here?
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 don't think so, this code runs on the event loop already so these writes will still either complete or fail properly even if we're in the process of shutting down.
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.
Is it always the case even when
getContinuation
dispatches to another thread pool?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.
Ah yes you're quite right, 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.
I've applied a fix in 6fac79d but it had to be a little different from #105306 since we don't have a listener to wrap any more. But then I realised we could do the same thing at the outer layer too, and extract a utility, and in fact what we do today at the outer layer is also a little questionable too. I made the relevant changes in #105486 and will migrate to that utility once it's available here.
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.
Similarly to the other PR, I wonder whether this could be
safeFailPromise(finishingWrite.onDone, new ClosedChannelException())
?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'd rather wait for the whole combiner to complete (and wonder whether we should do that in other places too). And
channel.newFailedFuture()
shouldn't be able to fail sosafeFailPromise
isn't necessary to fail that.