-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
implement servlet upgrade for ee10 #10128
Open
lachlan-roberts
wants to merge
15
commits into
jetty-12.0.x
Choose a base branch
from
experiment/jetty-12-ServletChannel-cleanup-ee10-servlet-upgrade
base: jetty-12.0.x
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 10 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
66cc353
Various Cleanup in ServletChannel
gregw adb2fb2
Various Cleanup in ServletChannel
gregw a02dd13
Various Cleanup in ServletChannel
gregw 8faf41e
make ServletChannel error dispatch async
lachlan-roberts de21dd7
Various Cleanup in ServletChannel
gregw 073e95a
scheduleDispatch after error handler callback
lachlan-roberts c980ab5
use AtomicBoolean instead of AtomicInteger for error dispatch callback
lachlan-roberts 0e2a0c1
remove checkAndPrepareUpgrade() from ServletChannel
lachlan-roberts 68439bf
implement servlet upgrade for ee10
lachlan-roberts 452a71b
adjust implementation to fix tests
lachlan-roberts 1a178a2
Merge remote-tracking branch 'origin/jetty-12.0.x' into experiment/je…
lachlan-roberts f222c45
re-enable ServletUpgradeTest for ee10
lachlan-roberts b5ae22f
Merge remote-tracking branch 'origin/jetty-12.0.x' into experiment/je…
lachlan-roberts 7911d62
Merge remote-tracking branch 'origin/jetty-12.0.x' into experiment/je…
lachlan-roberts 1869ca6
Merge remote-tracking branch 'origin/jetty-12.0.x' into experiment/je…
lachlan-roberts File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,6 +51,7 @@ | |
import org.eclipse.jetty.server.Handler; | ||
import org.eclipse.jetty.server.HttpChannel; | ||
import org.eclipse.jetty.server.HttpConfiguration; | ||
import org.eclipse.jetty.server.HttpConnection; | ||
import org.eclipse.jetty.server.HttpStream; | ||
import org.eclipse.jetty.server.Request; | ||
import org.eclipse.jetty.server.RequestLog; | ||
|
@@ -1272,7 +1273,12 @@ public void succeeded() | |
httpChannel.lockedStreamSendCompleted(true); | ||
} | ||
if (callback != null) | ||
httpChannel._serializedInvoker.run(callback::succeeded); | ||
{ | ||
// Do not use SerializedInvoker here because application code running within | ||
// SerializedInvoker could issue blocking write() or close() that would deadlock. | ||
// We must execute in case of recursive write within the callback. | ||
getRequest().getContext().execute(callback::succeeded); | ||
} | ||
} | ||
|
||
/** | ||
|
@@ -1300,7 +1306,12 @@ public void failed(Throwable x) | |
httpChannel.lockedStreamSendCompleted(false); | ||
} | ||
if (callback != null) | ||
httpChannel._serializedInvoker.run(() -> callback.failed(x)); | ||
{ | ||
// Do not use SerializedInvoker here because application code running within | ||
// SerializedInvoker could issue blocking write() or close() that would deadlock. | ||
// We must execute in case of recursive write within the callback. | ||
getRequest().getContext().execute(() -> callback.failed(x)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sbordet I don't like this, but we have a test which calls write from within the callback which results in recursion and a StackOverflowError if we execute the callback directly. |
||
} | ||
} | ||
|
||
@Override | ||
|
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
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.
We cannot have an execute on the callback of every write. This is a blocker. Let's analyse after 12.0.1 and see how we can avoid t his.