hadoop-zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r922759 - in /hadoop/zookeeper/trunk: CHANGES.txt src/java/main/org/apache/zookeeper/server/SyncRequestProcessor.java
Date Sun, 14 Mar 2010 04:01:06 GMT
Author: mahadev
Date: Sun Mar 14 04:01:05 2010
New Revision: 922759

URL: http://svn.apache.org/viewvc?rev=922759&view=rev
Log:
ZOOKEEPER-121. SyncRequestProcessor is not closing log stream during shutdown (breed via mahadev)

Modified:
    hadoop/zookeeper/trunk/CHANGES.txt
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/SyncRequestProcessor.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=922759&r1=922758&r2=922759&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Sun Mar 14 04:01:05 2010
@@ -279,6 +279,9 @@ BUGFIXES: 
   ZOOKEEPER-698. intermittent JMX test failures due to not verifying QuorumPeer
   shutdown (phunt)
 
+  ZOOKEEPER-121. SyncRequestProcessor is not closing log stream during shutdown
+  (breed via mahadev)
+
 IMPROVEMENTS:
   ZOOKEEPER-473. cleanup junit tests to eliminate false positives due to
   "socket reuse" and failure to close client (phunt via mahadev)

Modified: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/SyncRequestProcessor.java
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/SyncRequestProcessor.java?rev=922759&r1=922758&r2=922759&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/SyncRequestProcessor.java
(original)
+++ hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/SyncRequestProcessor.java
Sun Mar 14 04:01:05 2010
@@ -166,12 +166,17 @@ public class SyncRequestProcessor extend
     }
 
     public void shutdown() {
-        try{
+        queuedRequests.add(requestOfDeath);
+        try {
+            this.join();
+        } catch(InterruptedException e) {
+            LOG.warn("Interrupted while wating for " + this + " to finish");
+        }
+        try {
             zks.getZKDatabase().close();
         } catch (IOException ie) {
             LOG.warn("Error closing logs ", ie);
         }
-        queuedRequests.add(requestOfDeath);
         nextProcessor.shutdown();
     }
 



Mime
View raw message