[
https://issues.apache.org/jira/browse/BOOKKEEPER-54?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Flavio Junqueira resolved BOOKKEEPER-54.
----------------------------------------
Resolution: Duplicate
Duplicate of BOOKKEEPER-56.
> 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