You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Colm O hEigeartaigh (Jira)" <ji...@apache.org> on 2019/08/27 16:30:00 UTC

[jira] [Resolved] (CXF-8095) When the workqueue is full for more than asyncExecuteTimeout milliseconds the work is never added

     [ https://issues.apache.org/jira/browse/CXF-8095?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh resolved CXF-8095.
--------------------------------------
    Resolution: Fixed

Thanks for the patch.

> 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
>            Assignee: Colm O hEigeartaigh
>            Priority: Major
>             Fix For: 3.3.4
>
>         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)