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
CancellationScheduler
finishes even if not started #5212CancellationScheduler
finishes even if not started #5212Changes from 22 commits
af7537d
afcd9d2
2d052cc
48666e1
0a75a07
56ffff8
653ba0c
d2700a1
af8252e
bafb8a2
96b5fc1
2cdc080
57e1144
108df5c
b60abce
4e50d7c
742b40f
f1ff541
11baf70
e764192
5689068
6b3849e
8750768
e971dd9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
ctx.cancel()
called in a decorator before invokingdelegate.execute()
couldn't prevent the request headers from being written.Would we abort the request in the following points if
ctx.isCanceled()
is true?armeria/core/src/main/java/com/linecorp/armeria/client/HttpClientDelegate.java
Line 64 in 5689068
armeria/core/src/main/java/com/linecorp/armeria/client/HttpSessionHandler.java
Line 218 in 7911f59
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'm not decided on how we want to set up the dependency between
log
,HttpResponse
, andctx
yet but I think this is one possibility.I think overall we want to
For now, I'm imagining that:
ctx
is cancelled, then the correspondingHttpResponse
is cancelledres.isDone
overall for early cancellationBut I will have to explore this further. For now, I think this PR doesn't change the previous behavior so it should probably be safe to merge.
Do you prefer this be done in this PR as well?
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.
Sounds good.
The case where
ctx.cancel()
is called before a normalCancellationTask
is registered can be considered a separate issue.