[
https://issues.apache.org/jira/browse/BOOKKEEPER-54?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13142964#comment-13142964
]
Sijie Guo edited comment on BOOKKEEPER-54 at 11/3/11 8:55 AM:
--------------------------------------------------------------
Talked with lei and gavin, this issue is related to
[BOOKKEEPER-56|https://issues.apache.org/jira/browse/BOOKKEEPER-56] .
[BOOKKEEPER-56|https://issues.apache.org/jira/browse/BOOKKEEPER-56] can solve
this problem.
was (Author: hustlmsp):
Talked with lei and gavin, this issue is related to
[https://issues.apache.org/jira/browse/BOOKKEEPER-56|BOOKKEEPER-56] .
[https://issues.apache.org/jira/browse/BOOKKEEPER-56|BOOKKEEPER-56] can solve
this problem.
> 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