Jan Hallonsten created CXF-8095:
-----------------------------------
Summary: When the workqueue is full for more than
asyncExecuteTimeout milliseconds the work is never added
Key: CXF-8095
URL: https://issues.apache.org/jira/browse/CXF-8095
Project: CXF
Issue Type: Bug
Components: Transports
Affects Versions: 3.3.3
Reporter: Jan Hallonsten
Attachments: AsyncHTTPConduit_workqueue_is_full_fix.patch,
AsyncHTTPConduit_workqueue_is_full_test.patch
If for some reason the workqueue fills up when using the async client. The work
will be rejected and if it is still full after asyncExecuteTimeout the call to
offer will also fail and the exception will be caught and ignored in
[AsyncHTTPConduit.setHttpResponse|[https://github.com/apache/cxf/blob/42352e7197aa965109b0562fabadbea94233e68d/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java#L615]].
According to the comment another try will be done on the next consume but
according to our findings that will not happen. The first call to
setHttpResponse sets httpResponse even if the work is not successfully added to
the workqueue. So when
[retrySetHttpResponse|[https://github.com/apache/cxf/blob/42352e7197aa965109b0562fabadbea94233e68d/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java#L603]]
is called httpResponse == null will be false and setHttpResponse is not called
a second time.
I have created a test case in AsyncHTTPConduit to trigger the problem and have
also created a suggested fix for the problem. The patch files are attached to
this issue.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)