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 #5105 - StatisticsHandler Graceful Shutdown of Async Requests #5175

Merged
merged 8 commits into from
Aug 28, 2020

Conversation

lachlan-roberts
Copy link
Contributor

@lachlan-roberts lachlan-roberts commented Aug 19, 2020

Issue #5105

I have rebased this PR onto the branch from PR #5173 from @thomasdraebing.

If an async request has already started we do not properly add the AsyncListener to the HttpChannelState and instead treat it as a completed blocking request even though it has not completed. This is because we used the check state.isSuspended() instead of state.isAsyncStarted().

This PR also adds an optional configuration to not wait for the suspended requests when doing a graceful shutdown, but instead shutdown when there are no actively dispatched requests. This can be used as a setter on StatisticsHandler or by an ini property on stats.mod.

thomasdraebing and others added 4 commits August 19, 2020 09:59
If the request is async dispatched, the check state.isSuspended() is not
correct to determine if the request was async or not. The check
state.isAsyncStarted() should be used instead.

Signed-off-by: Lachlan Roberts <[email protected]>
…quests in StatisticsHandler

Signed-off-by: Lachlan Roberts <[email protected]>
StatisticsHandler no longer gives 503 responses after shutdown.

Signed-off-by: Lachlan Roberts <[email protected]>
@lachlan-roberts lachlan-roberts changed the title Issue #5105 - statistics handler Issue #5105 - StatisticsHandler Graceful Shutdown of Async Requests Aug 19, 2020
@lachlan-roberts lachlan-roberts force-pushed the jetty-9.4.x-5105-StatisticsHandler branch from d09055b to a9c90d3 Compare August 26, 2020 22:59
@lachlan-roberts lachlan-roberts merged commit 001def4 into jetty-9.4.x Aug 28, 2020
@lachlan-roberts lachlan-roberts deleted the jetty-9.4.x-5105-StatisticsHandler branch August 28, 2020 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants