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

Flavio Junqueira commented on BOOKKEEPER-55:
--------------------------------------------

The culprit seems to be this one:

{noformat}
+      SUCCESS, MALFORMED_REQUEST, NO_SUCH_TOPIC, CLIENT_ALREADY_SUBSCRIBED, 
CLIENT_NOT_SUBSCRIBED, COULD_NOT_CONNECT, TOPIC_BUSY, RESUBSCRIBE_EXCEPTION, 
NOT_RESPONSIBLE_FOR_TOPIC, SERVICE_DOWN, UNCERTAIN_STATE, 
INVALID_MESSAGE_FILTER, BAD_VERSION, NO_TOPIC_PERSISTENCE_INFO, 
TOPIC_PERSISTENCE_INFO_EXISTS, NO_SUBSCRIPTION_STATE, 
SUBSCRIPTION_STATE_EXISTS, NO_TOPIC_OWNER_INFO, TOPIC_OWNER_INFO_EXISTS, 
UNEXPECTED_CONDITION, COMPOSITE, 
{noformat}

It is ok to have the trailing space and the long line in the protobuf-generated 
file.
                
> SubscribeReconnectRetryTask might retry subscription endlessly when another 
> subscription is already successfully created previously
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-55
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-55
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: hedwig-client
>    Affects Versions: 4.0.0
>            Reporter: Gavin Li
>            Assignee: Sijie Guo
>             Fix For: 4.2.0
>
>         Attachments: BOOKKEEPER-55.patch, BOOKKEEPER-55.patch, patch
>
>
> For channelDisconnected envent, we try to automatically recover the 
> connection and subscription. But when users call HedwigSubscriber.subscribe() 
> at the same time, it might succeed before the auto recovery. Then the auto 
> recovery can never succeed as the server will report topic busy failure. Then 
> the SubscribeReconnectRetryTask will retry again and again endlessly. We 
> found this in our auto test.
> Fix is easy, we just need to firstly check if the channel for this topic and 
> subscribe id is null, if not it means some subscription is already created 
> before, we don't need to bother recover.

--
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

Reply via email to