[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-54?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13142956#comment-13142956
 ] 

Sijie Guo commented on BOOKKEEPER-54:
-------------------------------------

Flavio, I will talk with lei to confirm it, who reported this issue.
                
> race condition of messageHandler@SubscribeResponseHandler
> ---------------------------------------------------------
>
>                 Key: BOOKKEEPER-54
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-54
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: hedwig-client
>    Affects Versions: 3.4.0
>            Reporter: xulei
>             Fix For: 4.0.0
>
>
> 1. As we know, when stopDelivery, the messageHandler will be set to null.
> 2. We also know that in SubscribeReconnectCallback.operationFinished(), we 
> will check if the messageHandler is null, if messageHandler is not null, we 
> will startDelivery.
> Both the reconnect thread and the main thread will race the messageHandler. 
> For example,
> the reconnect handler checked that messageHandler is not null, and will 
> startDelivery, then main thread  exec stopDelivery, set messageHandler to 
> null, and then reconnect thread exec startDelivery, set messageHandler back 
> again. so although the client app stopDelivery, it still can receive message.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to