Fix issue #15698 Distinguish between timeout and task rejection in DefaultFuture#15738
Merged
zrlw merged 6 commits intoapache:3.3from Nov 13, 2025
qxggg:fix-issue-15698
Merged
Fix issue #15698 Distinguish between timeout and task rejection in DefaultFuture#15738zrlw merged 6 commits intoapache:3.3from qxggg:fix-issue-15698
zrlw merged 6 commits intoapache:3.3from
qxggg:fix-issue-15698
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 3.3 #15738 +/- ##
============================================
Coverage 60.77% 60.77%
- Complexity 15 11728 +11713
============================================
Files 1938 1938
Lines 88627 88633 +6
Branches 13381 13380 -1
============================================
+ Hits 53863 53867 +4
- Misses 29238 29239 +1
- Partials 5526 5527 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
Hi, I was wondering if you have some time to review my PR. I’d really appreciate your feedback. Thanks a lot! @zrlw |
Contributor
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What is the purpose of the change?
To fix #15698
This pull request improves the handling of Timeout tasks in DefaultFuture when the associated executor rejects the task due to being full or shut down.
Previously, if the executor rejected the timeout task, a RejectedExecutionException was thrown, which could interrupt the processing flow and was not easily consumable by the user. This change:
1. Captures the rejection and generates a proper Response with status SERVER_THREADPOOL_EXHAUSTED_ERROR (100).
2. Sends the response back to the caller via DefaultFuture.received(), ensuring the user can detect that the timeout task was not executed.
3. Removes the future from FUTURES to prevent resource leakage.
This improves both reliability and user visibility of executor rejection scenarios without throwing exceptions.