[
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:39 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 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.
was (Author: hustlmsp):
yes. the description is simple. we are trying to generate the patch. but
you already eager to generate a path, 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