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

Ivan Kelly commented on BOOKKEEPER-5:
-------------------------------------

BookieClient has a list of PerChannelBookieClient which in turn holds the netty 
Channel. My concern is that, by using ChannelGroup, 
PerChannelBookieClient#close is bypassed completely. Its not a problem now, as 
all it does it close the channel, but if in future it is used, it will never be 
called. I think the core of the problem is that it introduces an asymmetry in 
the lifetime management of the Channel object. PerChannelBookieClient creates 
it, but BookieClient destroys it.

My understanding of awaitUninterruptibly() is the same, and I think that is 
where the bug was. Since channel.close() is called but not awaited on, the 
thread moves on and calls releaseExternalResources() while the close is 
possibly still in progress.

> Issue with Netty in BookKeeper
> ------------------------------
>
>                 Key: BOOKKEEPER-5
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-5
>             Project: Bookkeeper
>          Issue Type: Bug
>            Reporter: Flavio Junqueira
>            Assignee: Flavio Junqueira
>         Attachments: BOOKKEEPER-5.patch, BOOKKEEPER-5.patch, 
> ZOOKEEPER-998.patch
>
>
> In one my experiments, I found that a BookKeeper object was locked after I 
> tried to halt it. By searching the Web, I found that the issue is described 
> here:
> http://www.jboss.org/netty/community.html#nabble-td5492010
> I'll upload a patch to fix it. For now, I'm marking it for 3.4.0, but if 
> there is any chance we can get it in 3.3.3, it would be nice.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to