[ https://issues.apache.org/jira/browse/BOOKKEEPER-507?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13542643#comment-13542643 ]
Sijie Guo commented on BOOKKEEPER-507: -------------------------------------- I am OK with these small changes to be fixed upon committing. thanks Flavio. > Race condition happens if closeSubscription and subscribe happened at the > same time (in multiplexed client). > ------------------------------------------------------------------------------------------------------------ > > Key: BOOKKEEPER-507 > URL: https://issues.apache.org/jira/browse/BOOKKEEPER-507 > Project: Bookkeeper > Issue Type: Bug > Reporter: Sijie Guo > Assignee: Sijie Guo > Priority: Blocker > Fix For: 4.2.0 > > Attachments: BOOKKEEPER-507.diff, BOOKKEEPER-507.diff, > BOOKKEEPER-507.diff, subscribeshouldrespondafterstartserving.patch > > > 1) closesub first > 2) sub late > 3) closesub succeed, but response is delayed to client. > 4) since closesub succeed in server side, so sub succeed and tried to deliver > message. > 5) sub response is back > 6) client checked and found that there is already a subscriber there. > 7) client failed the subscribe request > 8) but the message would still be delivered to same channel. since the sub > state is not be cleared. message is still be received. > 9) closesub response is back. > 10) it clear the subscribe state. > 11) message continue delivering but found there is no subscriber state. > at step 11) the problem happened. > this race condition is introduced in multiplexed client (BOOKKEEPER-70). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira