Return-Path: X-Original-To: apmail-hbase-commits-archive@www.apache.org Delivered-To: apmail-hbase-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 06D389CC1 for ; Mon, 17 Oct 2011 05:15:44 +0000 (UTC) Received: (qmail 75232 invoked by uid 500); 17 Oct 2011 05:15:43 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 75214 invoked by uid 500); 17 Oct 2011 05:15:42 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 75206 invoked by uid 99); 17 Oct 2011 05:15:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Oct 2011 05:15:40 +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; Mon, 17 Oct 2011 05:15:38 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id B7F3F238888F for ; Mon, 17 Oct 2011 05:15:18 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1185009 - in /hbase/branches/0.92: CHANGES.txt src/main/java/org/apache/hadoop/hbase/regionserver/SplitTransaction.java Date: Mon, 17 Oct 2011 05:15:18 -0000 To: commits@hbase.apache.org From: larsh@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111017051518.B7F3F238888F@eris.apache.org> Author: larsh Date: Mon Oct 17 05:15:18 2011 New Revision: 1185009 URL: http://svn.apache.org/viewvc?rev=1185009&view=rev Log: HBASE-4563 When error occurs in this.parent.close(false) of split, the split region cannot write or read Modified: hbase/branches/0.92/CHANGES.txt hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/SplitTransaction.java Modified: hbase/branches/0.92/CHANGES.txt URL: http://svn.apache.org/viewvc/hbase/branches/0.92/CHANGES.txt?rev=1185009&r1=1185008&r2=1185009&view=diff ============================================================================== --- hbase/branches/0.92/CHANGES.txt (original) +++ hbase/branches/0.92/CHANGES.txt Mon Oct 17 05:15:18 2011 @@ -705,6 +705,8 @@ Release 0.90.5 - Unreleased sources running HBASE-4282 Ensure RegionServer aborts when WAL close fails with deferred flush edits + HBASE-4563 When error occurs in this.parent.close(false) of split, + the split region cannot write or read (bluedavy via Lars H) IMPROVEMENT HBASE-4205 Enhance HTable javadoc (Eric Charles) Modified: hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/SplitTransaction.java URL: http://svn.apache.org/viewvc/hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/SplitTransaction.java?rev=1185009&r1=1185008&r2=1185009&view=diff ============================================================================== --- hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/SplitTransaction.java (original) +++ hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/SplitTransaction.java Mon Oct 17 05:15:18 2011 @@ -246,18 +246,22 @@ public class SplitTransaction { createSplitDir(this.parent.getFilesystem(), this.splitdir); this.journal.add(JournalEntry.CREATE_SPLIT_DIR); - - List hstoreFilesToSplit = this.parent.close(false); - if (hstoreFilesToSplit == null) { - // The region was closed by a concurrent thread. We can't continue - // with the split, instead we must just abandon the split. If we - // reopen or split this could cause problems because the region has - // probably already been moved to a different server, or is in the - // process of moving to a different server. - throw new IOException("Failed to close region: already closed by " + - "another thread"); + + List hstoreFilesToSplit = null; + try{ + hstoreFilesToSplit = this.parent.close(false); + if (hstoreFilesToSplit == null) { + // The region was closed by a concurrent thread. We can't continue + // with the split, instead we must just abandon the split. If we + // reopen or split this could cause problems because the region has + // probably already been moved to a different server, or is in the + // process of moving to a different server. + throw new IOException("Failed to close region: already closed by " + + "another thread"); + } + } finally { + this.journal.add(JournalEntry.CLOSED_PARENT_REGION); } - this.journal.add(JournalEntry.CLOSED_PARENT_REGION); if (!testing) { services.removeFromOnlineRegions(this.parent.getRegionInfo().getEncodedName());