You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Flavio Junqueira (JIRA)" <ji...@apache.org> on 2011/06/14 14:13:47 UTC

[jira] [Commented] (ZOOKEEPER-1060) QuorumPeer takes a long time to shutdown

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

Flavio Junqueira commented on ZOOKEEPER-1060:
---------------------------------------------

+1, I have just committed this one (Committed revision 1135515.). Thanks, Vishal.

> QuorumPeer takes a long time to shutdown
> ----------------------------------------
>
>                 Key: ZOOKEEPER-1060
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1060
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: quorum
>    Affects Versions: 3.4.0
>            Reporter: Vishal K
>            Assignee: Vishal K
>            Priority: Minor
>             Fix For: 3.4.0
>
>         Attachments: ZOOKEEPER-1060.patch
>
>
> This problem is seen only if you have ZooKeeper embedded in your application. QuorumPeerMain.initializeAndRun() does a quorumPeer.join() before exiting.
> QuorumPeer.shutdown() tries to cleanup everything, but it does not interrupt itself. As a result, a if the peer is running FLE, it might be waiting to receive notifications (recvqueue.poll()) in FastLeaderElection. Therefore, quorumPeer.join() will wait until the peer wakes up from poll().
> The fix is simple - call this.interrupt() in QuorumPeer.shutdown().

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