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

Flavio Junqueira commented on BOOKKEEPER-5:
-------------------------------------------

The trunk code in BookiClient.close() is this:

{noformat}
for (PerChannelBookieClient channel: channels.values()){
            channel.close();
        }
{noformat}

and I have just replaced it with channelGroup.close(). The documentation of 
ChannelFactory says:

{noformat}
Graceful shutdown

To shut down a network application service which is managed by a factory. you 
should follow the following steps:

   1- close all channels created by the factory and their child channels 
usually using ChannelGroup.close(), and
   2- call releaseExternalResources().
{noformat}

and if you look at the ChannelGroup documentation, I'm just using the way they 
suggest. Finally, in my understanding of awaitUninterruptibly() is that the 
thread waits and can't be interrupted.

On the test, BookKeeper.halt() is invoked from the tearDown method of 
BaseTestCase, which the test class extends. I tried applying only the new test, 
and it hangs on my computer. 



> 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