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 #12266 - InvocationType improvements and cleanups. #12551

Merged

Conversation

sbordet
Copy link
Contributor

@sbordet sbordet commented Nov 19, 2024

This is the work for the server-side only, the client side will be done in another pull request.

Previously, AbstractConnection.getInvocationType() was called by AbstractConnection.ReadCallback, but it was deprecated and is now removed, along with all its overrides.

This mechanism is now replaced by using a specific Callback implementation for each AbstractConnection subclass. For example, HttpConnection uses HttpConnection.FillableCallback that in turn asks the InvocationType to the Server, and therefore the Handler tree.

Restored synchronous code for ServerFCGIConnection.close(), ensuring super.close() is always called. Ensuring that in HttpConnection.close(), super.close() is always called.

This is the work for the server-side only, the client side will be done in another pull request.

Previously, AbstractConnection.getInvocationType() was called by AbstractConnection.ReadCallback, but it was deprecated and is now removed, along with all its overrides.

This mechanism is now replaced by using a specific Callback implementation for each AbstractConnection subclass.
For example, HttpConnection uses HttpConnection.FillableCallback that in turn asks the InvocationType to the Server, and therefore the `Handler` tree.

Restored synchronous code for ServerFCGIConnection.close(), ensuring super.close() is always called.
Ensuring that in HttpConnection.close(), super.close() is always called.

Signed-off-by: Simone Bordet <[email protected]>
@sbordet sbordet requested review from gregw and lorban November 19, 2024 18:59
@sbordet
Copy link
Contributor Author

sbordet commented Nov 19, 2024

@gregw @lorban I decided to split #12299 into server (this PR) and client (a future PR).

The original problem is that we can easily guarantee user code invoked by a virtual thread in the server, but not so much in the client (I know).

This PR cleans up the code for the server, mostly just removing deprecated code and little other cleanups.

The work to be done for the client is larger, and will be address later in a different PR, and eventually #12299 will be closed without merging it.

@sbordet sbordet linked an issue Nov 19, 2024 that may be closed by this pull request
sbordet and others added 4 commits November 19, 2024 21:35
Improved messages
used on more modules
…for idle timeout and failure tasks.

* Small code improvements.

Signed-off-by: Simone Bordet <[email protected]>
… error response) and the promise (resetting the stream).

Signed-off-by: Simone Bordet <[email protected]>
Signed-off-by: Simone Bordet <[email protected]>
Signed-off-by: Simone Bordet <[email protected]>
@sbordet sbordet requested a review from gregw November 21, 2024 10:22
Signed-off-by: Simone Bordet <[email protected]>
Copy link
Contributor

@gregw gregw left a comment

Choose a reason for hiding this comment

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

Looks good other than a couple of questions

@sbordet sbordet merged commit 3d68e2b into jetty-12.1.x Nov 22, 2024
2 of 4 checks passed
@sbordet sbordet deleted the fix/jetty-12.1.x/12266/server-invocationtype-cleanups branch November 22, 2024 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

InvocationType improvements and cleanups
2 participants