Skip to content
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

Issue #10933 - Fix AsyncIOServlet test issues #10949

Merged
merged 6 commits into from
Dec 14, 2023

Conversation

gregw
Copy link
Contributor

@gregw gregw commented Nov 29, 2023

Fixes #10933

@joakime joakime changed the title Call ServletChannelState.asyncFailure from error listener. Fix #10933 Issue #10933 - Call ServletChannelState.asyncFailure from error listener. Dec 4, 2023
@joakime joakime linked an issue Dec 4, 2023 that may be closed by this pull request
@gregw
Copy link
Contributor Author

gregw commented Dec 13, 2023

@lorban @sbordet @lachlan-roberts This is going to need careful review. Your early thoughts would be appreciated

@gregw gregw marked this pull request as ready for review December 13, 2023 11:55
@joakime
Copy link
Contributor

joakime commented Dec 13, 2023

@gregw what release of Jetty 12 do you want to see this in?

@gregw
Copy link
Contributor Author

gregw commented Dec 13, 2023

@gregw what release of Jetty 12 do you want to see this in?

It doesn't need to be in the next release... but if it is ready, then no reason why not. I'll add to the project and we can punt if it is not ready

@gregw gregw changed the title Issue #10933 - Call ServletChannelState.asyncFailure from error listener. Issue #10933 - Fix AsyncIOServlet test issues Dec 13, 2023
@gregw
Copy link
Contributor Author

gregw commented Dec 13, 2023

@sbordet @lorban @lachlan-roberts nudge!

@sbordet
Copy link
Contributor

sbordet commented Dec 13, 2023

@gregw please add someone as reviewer, or we won't see it.

@gregw gregw requested review from sbordet, lorban and lachlan-roberts and removed request for lorban December 13, 2023 20:59
@gregw
Copy link
Contributor Author

gregw commented Dec 13, 2023

@gregw please add someone as reviewer, or we won't see it.

oops

{
_failureListener = true;
_servletChannel.getRequest().addFailureListener(this::asyncError);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't you just add this in the constructor, like the idle timeout listener?

Also, should not there be a similar code in ee9?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only needed if startAsync is called
Added to ee9, but needs your PR to really test it.

@gregw gregw requested a review from sbordet December 13, 2023 23:38
@gregw gregw merged commit f776d3e into jetty-12.0.x Dec 14, 2023
8 checks passed
@gregw gregw deleted the fix/jetty-12.0.x/10933/asyncError branch December 14, 2023 23:54
sbordet added a commit that referenced this pull request Dec 17, 2023
Most often failures come from the read side, so failure listeners are now serialized in the _readInvoker.
This avoids that a failure while parsing a request (e.g. an early EOF) results in concurrent executions of the invokeOnContentAvailable task and the invokeOnFailureListeners task.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
sbordet added a commit that referenced this pull request Dec 17, 2023
Fixed HttpChannelTest.testOnFailure().

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Review ServletChannelState.asyncError()
3 participants