-
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
Jetty 12 idletimeout #9905
Jetty 12 idletimeout #9905
Conversation
+ pass TimeoutException through all APIs + HttpConnection now passes on TimeoutException to HttpChannel.onFailure
Signed-off-by: Simone Bordet <[email protected]>
* Improved reset of the earliest timeout before iteration. * Removed check for getExpireNanoTime() == -1, since it's a valid value. * When onExpired(Expirable) returns false, the Expirable should arrange to move its timeout in the future. Signed-off-by: Simone Bordet <[email protected]>
Signed-off-by: Ludovic Orban <[email protected]>
….failed() in all cases to complete the wrapped callback. Signed-off-by: Simone Bordet <[email protected]>
…ll super.failed() in all cases to complete the wrapped callback." This reverts commit 5ac57c1.
@lorban @lachlan-roberts The key changes in this PR are:
|
# Conflicts: # jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletChannel.java # jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/HttpChannel.java
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.
There are quite a few TODOs in the tests, but we can tackle them after the 12.0.0 release.
So LGTM.
@@ -1202,6 +1203,23 @@ public void call(Invocable.Callable callable, Request request) throws Exception | |||
} | |||
} | |||
|
|||
public <T> boolean test(Predicate<T> predicate, T t, Request request) |
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.
This looks unused. Should we keep it nevertheless?
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.
@lorban It has been used before, but now that we don't have listening predicates..... oh but wait yes we do. This should be used by the context addIdleTimeoutListener wrapper that is not implemented!!!! stand by.....
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.
@lorban I've added the context wrapper so idle timeouts are callback in the context. I've also added a test to check that. Please re-review... at least that last commit.
|
||
// TODO what do we do about the failing write? | ||
// should timeout errors be non persistent? | ||
Callback ocb = callback; |
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.
Should we keep this wrapping?
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.
long term no, but whilst we still have work to do....
} | ||
|
||
@Test | ||
public void testIdleTimeoutNoListenerHttpConfigurationOnly() throws Exception |
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 fail to see what this test asserts that the above one (testIdleTimeoutNoListener()
) does not.
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.
This one has the idle timeout configured in HttpConfiguration only, so it is testing that it is correctly applied by HttpChannel. I.e the idle timeout between requests is 10x the idle timeout during requests.
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.
(probably could have been parameterised... will do when I next touch this test.)
Rework idle timeout mechanism, undisable tests