zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r1150903 - in /zookeeper/trunk: CHANGES.txt src/java/main/org/apache/zookeeper/server/SyncRequestProcessor.java
Date Mon, 25 Jul 2011 20:49:27 GMT
Author: mahadev
Date: Mon Jul 25 20:49:26 2011
New Revision: 1150903

URL: http://svn.apache.org/viewvc?rev=1150903&view=rev
Log:
ZOOKEEPER-1109. Zookeeper service is down when SyncRequestProcessor meets any exception. (Laxman
via mahadev)

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

Modified: zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/trunk/CHANGES.txt?rev=1150903&r1=1150902&r2=1150903&view=diff
==============================================================================
--- zookeeper/trunk/CHANGES.txt (original)
+++ zookeeper/trunk/CHANGES.txt Mon Jul 25 20:49:26 2011
@@ -256,6 +256,9 @@ BUGFIXES: 
   
   ZOOKEEPER-1027. chroot not transparent in zoo_create() (Thijs Terlouw via
   mahadev)
+  
+  ZOOKEEPER-1109. Zookeeper service is down when SyncRequestProcessor meets
+  any exception. (Laxman via mahadev)
 
 IMPROVEMENTS:
   ZOOKEEPER-724. Improve junit test integration - log harness information 

Modified: zookeeper/trunk/src/java/main/org/apache/zookeeper/server/SyncRequestProcessor.java
URL: http://svn.apache.org/viewvc/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/SyncRequestProcessor.java?rev=1150903&r1=1150902&r2=1150903&view=diff
==============================================================================
--- zookeeper/trunk/src/java/main/org/apache/zookeeper/server/SyncRequestProcessor.java (original)
+++ zookeeper/trunk/src/java/main/org/apache/zookeeper/server/SyncRequestProcessor.java Mon
Jul 25 20:49:26 2011
@@ -41,6 +41,7 @@ public class SyncRequestProcessor extend
     private final RequestProcessor nextProcessor;
 
     private Thread snapInProcess = null;
+    volatile private boolean running;
 
     /**
      * Transactions that have been written and are waiting to be flushed to
@@ -62,6 +63,7 @@ public class SyncRequestProcessor extend
         super("SyncThread:" + zks.getServerId());
         this.zks = zks;
         this.nextProcessor = nextProcessor;
+        running = true;
     }
 
     /**
@@ -147,6 +149,7 @@ public class SyncRequestProcessor extend
             }
         } catch (Throwable t) {
             LOG.error("Severe unrecoverable error, exiting", t);
+            running = false;
             System.exit(11);
         }
         LOG.info("SyncRequestProcessor exited!");
@@ -170,7 +173,9 @@ public class SyncRequestProcessor extend
         LOG.info("Shutting down");
         queuedRequests.add(requestOfDeath);
         try {
-            this.join();
+            if(running){
+                this.join();
+            }
         } catch(InterruptedException e) {
             LOG.warn("Interrupted while wating for " + this + " to finish");
         }



Mime
View raw message