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

Reply via email to