You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Roger Meier (JIRA)" <ji...@apache.org> on 2014/01/22 00:12:21 UTC

[jira] [Resolved] (THRIFT-2108) Fix TAsyncClientManager timeout race

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

Roger Meier resolved THRIFT-2108.
---------------------------------

    Resolution: Fixed
      Assignee: Roger Meier

Thanks Vadmin!

committed
;-r


> Fix TAsyncClientManager timeout race
> ------------------------------------
>
>                 Key: THRIFT-2108
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2108
>             Project: Thrift
>          Issue Type: Bug
>          Components: Java - Library
>    Affects Versions: 0.9
>            Reporter: Vadim Spivak
>            Assignee: Roger Meier
>         Attachments: thrift-2108-fix-timeout-race.patch
>
>
> TAsyncClientManager uses a TreeSet(timeoutWatchSet) for managing timeouts with a comparator based on the timeout timestamp. However, this timestamp can be mutated externally by changing the client timeout before TAsyncClientManager tries to remove (and fails) the TAsyncMethodCall from the timeout set. 
> Failing to delete the TAsyncMethodCall from the timeoutWatchSet will break some timeouts and cause some callbacks to fire twice, once with onComplete and a second time with onError. 
> The common use case when this happens is if you want to issue a new request with a different timeout to the same client inside an onComplete callback. 



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