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();
     }
 


Reply via email to