hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HTTPASYNC-64) Race condition using CachingHttpAsyncClient
Date Mon, 27 Jan 2014 14:30:39 GMT

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

Oleg Kalnichevski resolved HTTPASYNC-64.
----------------------------------------

    Resolution: Fixed

This turned out to be a much more severe issue than I had anticipated. I had to rewrite future
chaining logic pretty much entirely and had to change way too much I had thought I would have
to.

@Rahul
Could you please re-test your application with the latest snapshot?

Oleg

> Race condition using CachingHttpAsyncClient
> -------------------------------------------
>
>                 Key: HTTPASYNC-64
>                 URL: https://issues.apache.org/jira/browse/HTTPASYNC-64
>             Project: HttpComponents HttpAsyncClient
>          Issue Type: Bug
>    Affects Versions: 4.0 Final
>         Environment: JDK 1.7, macbook pro
>            Reporter: Rahul 
>              Labels: CachingHttpAsyncClient, FutureHttpResponse, concurrency, race-condition
>             Fix For: 4.0.1
>
>
> Running into a race condition when using CachingHttpAsyncClient. The async client at
times returns null from the FutureHttpResponse obtained from CachingHttpAsyncClient.execute(HttpGet,
null)
> In FutureHttpResponse the get() method has the following implementation - 
> try {
>             getDelegate().get();
>         } catch (ExecutionException e) {
>             // ignore
>         }
>         final HttpResponse result = getResponse();
> When the getDelegate().get(); returns, the getResponse() returns null. It seems the thread
doing the actual request/response processing still hasn't called "setResponse". 



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message