zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vishal K (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ZOOKEEPER-1060) QuorumPeer takes a long time to shutdown
Date Tue, 10 May 2011 19:33:47 GMT
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


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

Mime
View raw message