Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.2.6
-
None
-
Unknown
Description
Creating this Jira according to the discussion here
In the method
If the work queue is full so that RejectedExecutionException is thrown and allowCurrentThread is false like when called from AsyncHttpConduit the expression in the if statement below will always return false and the response will be handled on the current thread via the call to handleResponseInternal. When used from AsyncHttpConduit this will be the IO core thread which is not a good idea.
} catch (RejectedExecutionException rex) { if (allowCurrentThread && policy != null && policy.isSetAsyncExecuteTimeoutRejection() && policy.isAsyncExecuteTimeoutRejection()) { throw rex; } if (!hasLoggedAsyncWarning) { LOG.warning("EXECUTOR_FULL_WARNING"); hasLoggedAsyncWarning = true; } LOG.fine("EXECUTOR_FULL"); handleResponseInternal(); }
I think that the code above should be changed to
} catch (RejectedExecutionException rex) { if (!allowCurrentThread || (policy != null && policy.isSetAsyncExecuteTimeoutRejection() && policy.isAsyncExecuteTimeoutRejection())) { throw rex; } if (!hasLoggedAsyncWarning) { LOG.warning("EXECUTOR_FULL_WARNING"); hasLoggedAsyncWarning = true; } LOG.fine("EXECUTOR_FULL"); handleResponseInternal(); }
Attachments
Issue Links
- links to