zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From si...@apache.org
Subject svn commit: r1565109 - in /zookeeper/bookkeeper/trunk: CHANGES.txt bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java
Date Thu, 06 Feb 2014 08:25:46 GMT
Author: sijie
Date: Thu Feb  6 08:25:45 2014
New Revision: 1565109

URL: http://svn.apache.org/r1565109
Log:
BOOKKEEPER-729: Bookie shouldn't exit with 0, if exiting from deathwatcher and thread death
was caused by OOM (ivank via fpj)

Modified:
    zookeeper/bookkeeper/trunk/CHANGES.txt
    zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java

Modified: zookeeper/bookkeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/bookkeeper/trunk/CHANGES.txt?rev=1565109&r1=1565108&r2=1565109&view=diff
==============================================================================
--- zookeeper/bookkeeper/trunk/CHANGES.txt (original)
+++ zookeeper/bookkeeper/trunk/CHANGES.txt Thu Feb  6 08:25:45 2014
@@ -158,6 +158,8 @@ Trunk (unreleased changes)
 
         BOOKKEEPER-728: Bookkeeper#Builder is not public, so can't be used outside of client
package (ivank via fpj)
 
+        BOOKKEEPER-729: Bookie shouldn't exit with 0, if exiting from deathwatcher and thread
death was caused by OOM (ivank via fpj)
+
       hedwig-server:
 
         BOOKKEEPER-601: readahead cache size isn't updated correctly (sijie via fpj)

Modified: zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java
URL: http://svn.apache.org/viewvc/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java?rev=1565109&r1=1565108&r2=1565109&view=diff
==============================================================================
--- zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java
(original)
+++ zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java
Thu Feb  6 08:25:45 2014
@@ -939,7 +939,9 @@ public class Bookie extends BookieCritic
                 // the exitCode only set when first shutdown usually due to exception found
                 LOG.info("Shutting down Bookie-{} with exitCode {}",
                          conf.getBookiePort(), exitCode);
-                this.exitCode = exitCode;
+                if (this.exitCode == ExitCode.OK) {
+                    this.exitCode = exitCode;
+                }
                 // mark bookie as in shutting down progress
                 shuttingdown = true;
 
@@ -967,13 +969,13 @@ public class Bookie extends BookieCritic
 
                 // Shutdown the ZK client
                 if(zk != null) zk.close();
-
-                // setting running to false here, so watch thread
-                // in bookie server know it only after bookie shut down
-                running = false;
             }
         } catch (InterruptedException ie) {
             LOG.error("Interrupted during shutting down bookie : ", ie);
+        } finally {
+            // setting running to false here, so watch thread
+            // in bookie server know it only after bookie shut down
+            running = false;
         }
         return this.exitCode;
     }



Mime
View raw message