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

          Vishal Kher created issue -
          Hide
          Vishal Kher added a comment -

          patch for trunk

          Show
          Vishal Kher added a comment - patch for trunk
          Vishal Kher made changes -
          Field Original Value New Value
          Attachment ZOOKEEPER-1060.patch [ 12478724 ]
          Hide
          Vishal Kher added a comment -

          for trunk

          Show
          Vishal Kher added a comment - for trunk
          Vishal Kher made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Hide
          Hadoop QA added a comment -

          +1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12478724/ZOOKEEPER-1060.patch
          against trunk revision 1099329.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 3 new or modified tests.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 core tests. The patch passed core unit tests.

          +1 contrib tests. The patch passed contrib unit tests.

          Test results: https://builds.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/255//testReport/
          Findbugs warnings: https://builds.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/255//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Console output: https://builds.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/255//console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12478724/ZOOKEEPER-1060.patch against trunk revision 1099329. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/255//testReport/ Findbugs warnings: https://builds.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/255//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/255//console This message is automatically generated.
          Patrick Hunt made changes -
          Link This issue is duplicated by ZOOKEEPER-1069 [ ZOOKEEPER-1069 ]
          Hide
          Jeremy Stribling added a comment -

          I think this will also fix ZOOKEEPER-1069, which resulted in a corrupted on-disk log. I am trying out the patch now, but we only saw the problem once in months of testing, so it'll be hard for me to verify for sure.

          Show
          Jeremy Stribling added a comment - I think this will also fix ZOOKEEPER-1069 , which resulted in a corrupted on-disk log. I am trying out the patch now, but we only saw the problem once in months of testing, so it'll be hard for me to verify for sure.
          Hide
          Flavio Junqueira added a comment -

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

          Show
          Flavio Junqueira added a comment - +1, I have just committed this one (Committed revision 1135515.). Thanks, Vishal.
          Flavio Junqueira made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Mahadev konar made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development