Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-1060

QuorumPeer takes a long time to shutdown

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.4.0
    • 3.4.0
    • quorum
    • None

    Description

      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().

      Attachments

        1. ZOOKEEPER-1060.patch
          2 kB
          Vishal Kher

        Issue Links

          Activity

            People

              vishalmlst Vishal Kher
              vishalmlst Vishal Kher
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: