ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-1060

QuorumPeer takes a long time to shutdown

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.4.0
    • Fix Version/s: 3.4.0
    • Component/s: quorum
    • Labels:
      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().

        Issue Links

          Activity

          Mahadev konar made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Flavio Junqueira made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Patrick Hunt made changes -
          Link This issue is duplicated by ZOOKEEPER-1069 [ ZOOKEEPER-1069 ]
          Vishal Kher made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Vishal Kher made changes -
          Field Original Value New Value
          Attachment ZOOKEEPER-1060.patch [ 12478724 ]
          Vishal Kher created issue -

            People

            • Assignee:
              Vishal Kher
              Reporter:
              Vishal Kher
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development