-
Notifications
You must be signed in to change notification settings - Fork 184
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
FlakyTest: CancellationTest - Improve close handling #1404
Merged
tkountis
merged 5 commits into
apple:main
from
tkountis:impr/cancellationtest-capture-stack
Apr 5, 2021
Merged
FlakyTest: CancellationTest - Improve close handling #1404
tkountis
merged 5 commits into
apple:main
from
tkountis:impr/cancellationtest-capture-stack
Apr 5, 2021
Conversation
This file contains 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
c8beae1
to
60ee945
Compare
82a2381
to
1c27d2d
Compare
bondolo
approved these changes
Mar 4, 2021
...-router-jersey/src/testFixtures/java/io/servicetalk/http/router/jersey/CancellationTest.java
Outdated
Show resolved
Hide resolved
Scottmitch
reviewed
Mar 5, 2021
...-router-jersey/src/testFixtures/java/io/servicetalk/http/router/jersey/CancellationTest.java
Outdated
Show resolved
Hide resolved
(cherry picked from commit bb54b62)
1c27d2d
to
e39accf
Compare
e39accf
to
aa23a19
Compare
tkountis
commented
Mar 24, 2021
|
||
@Override | ||
public boolean hasEntity() { | ||
if (state == State.CLOSED) { |
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.
Best effort.
Scottmitch
reviewed
Mar 25, 2021
...-router-jersey/src/testFixtures/java/io/servicetalk/http/router/jersey/CancellationTest.java
Outdated
Show resolved
Hide resolved
...jersey/src/main/java/io/servicetalk/http/router/jersey/DefaultJerseyStreamingHttpRouter.java
Outdated
Show resolved
Hide resolved
...-router-jersey/src/testFixtures/java/io/servicetalk/http/router/jersey/CancellationTest.java
Outdated
Show resolved
Hide resolved
1c8e8e1
to
27e12f6
Compare
bondolo
reviewed
Apr 1, 2021
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.
Looks OK to me but not confident to approve
Build failure attributed to #1467 |
Scottmitch
reviewed
Apr 1, 2021
...-router-jersey/src/testFixtures/java/io/servicetalk/http/router/jersey/CancellationTest.java
Outdated
Show resolved
Hide resolved
...jersey/src/main/java/io/servicetalk/http/router/jersey/DefaultJerseyStreamingHttpRouter.java
Outdated
Show resolved
Hide resolved
...jersey/src/main/java/io/servicetalk/http/router/jersey/DefaultJerseyStreamingHttpRouter.java
Show resolved
Hide resolved
...jersey/src/main/java/io/servicetalk/http/router/jersey/DefaultJerseyStreamingHttpRouter.java
Show resolved
Hide resolved
idelpivnitskiy
approved these changes
Apr 5, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation:
The
EntityInputStream
is not thread safe, and the cancellation is triggering aclose
from any thread, while the access path is through the offloaded thread.Modifications:
Extend the
ContainerRequest
to capture close and handoff it to the offloaded thread if a read is already in progress, or close it atomically otherwise.Result:
Better thread visibility and serialization of events in case of a read is in progress.
Fixes: #999