Return-Path: X-Original-To: apmail-zookeeper-commits-archive@www.apache.org Delivered-To: apmail-zookeeper-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4501310078 for ; Thu, 6 Feb 2014 08:26:09 +0000 (UTC) Received: (qmail 80059 invoked by uid 500); 6 Feb 2014 08:26:08 -0000 Delivered-To: apmail-zookeeper-commits-archive@zookeeper.apache.org Received: (qmail 79955 invoked by uid 500); 6 Feb 2014 08:26:08 -0000 Mailing-List: contact commits-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ Delivered-To: mailing list commits@zookeeper.apache.org Received: (qmail 79947 invoked by uid 99); 6 Feb 2014 08:26:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Feb 2014 08:26:08 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Feb 2014 08:26:06 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 3C6372388860; Thu, 6 Feb 2014 08:25:46 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@zookeeper.apache.org From: sijie@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140206082546.3C6372388860@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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; }