hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From la...@apache.org
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 GMT
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<StoreFile> 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<StoreFile> 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());



Mime
View raw message