You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by "Sijie Guo (JIRA)" <ji...@apache.org> on 2013/06/11 02:40:20 UTC

[jira] [Comment Edited] (BOOKKEEPER-620) PerChannelBookieClient race during channel disconnect

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

Sijie Guo edited comment on BOOKKEEPER-620 at 6/11/13 12:40 AM:
----------------------------------------------------------------

yes. the description is simple. we are trying to generate the patch. but you already eager to generate a patch, that's fine. several comments as below:

1. remove the LOG.info("Already connected with another channel" or change it to DEBUG. it might generate lots of useless statements.
2. in channelDisconnected, we'd better to check whether the current channel in PCBC client is the right channel disconnected in (ChannelEvent) before setting state to DISCONNECTED state. And it is better to close channel in ChannelEvent not channel in PCBC. otherwise, it would enter a dead loop: new estabilished channels are closed by previous channelDisconnected events.
3. it would be better to check ChannelClosedException when writing request failure and set the channel to DISCONNECTED.


                
      was (Author: hustlmsp):
    yes. the description is simple. we are trying to generate the patch. but you already eager to generate a patch, that's fine. several comments as below:

1. remove the LOG.info("Already connected with another channel" or change it to DEBUG. it might generate lot so useless statements.
2. in channelDisconnected, we'd better to check whether the current channel in PCBC client is the right channel disconnected in (ChannelEvent) before setting state to DISCONNECTED state. And it is better to close channel in ChannelEvent not channel in PCBC. otherwise, it would enter a dead loop: new estabilished channels are closed by previous channelDisconnected events.
3. it would be better to check ChannelClosedException when writing request failure and set the channel to DISCONNECTED.


                  
> PerChannelBookieClient race during channel disconnect
> -----------------------------------------------------
>
>                 Key: BOOKKEEPER-620
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-620
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-client
>            Reporter: Sijie Guo
>            Assignee: Robin Dhamankar
>             Fix For: 4.2.2, 4.3.0
>
>         Attachments: 0002-BOOKKEEPER-620-PerChannelBookieClient-race-during-ch.patch, BOOKKEEPER-620.diff
>
>
> channel & state are not synchronized in PerChannelBookieClient#closeInternal. so it might cause state is set to CONNECTED but the netty channel is closed by mistake in closeInternal.

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