hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeffr...@apache.org
Subject git commit: HBASE-12319: Inconsistencies during region recovery due to close/open of a region during recovery
Date Tue, 04 Nov 2014 05:36:08 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 d4eb7d1bd -> c84b13514


HBASE-12319: Inconsistencies during region recovery due to close/open of a region during recovery


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/c84b1351
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/c84b1351
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/c84b1351

Branch: refs/heads/branch-1
Commit: c84b13514e22588282a32dde9fe477287806643b
Parents: d4eb7d1
Author: Jeffrey Zhong <jeffreyz@apache.org>
Authored: Mon Nov 3 21:31:12 2014 -0800
Committer: Jeffrey Zhong <jeffreyz@apache.org>
Committed: Mon Nov 3 21:31:12 2014 -0800

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/regionserver/HRegionServer.java   | 2 +-
 .../apache/hadoop/hbase/regionserver/TestRegionServerNoMaster.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/c84b1351/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
index 2f34587..be26b35 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
@@ -2591,7 +2591,7 @@ public class HRegionServer extends HasThread implements
       if (actualRegion == null) { // If already online, we still need to close it.
         LOG.info("The opening previously in progress has been cancelled by a CLOSE request.");
         // The master deletes the znode when it receives this exception.
-        throw new NotServingRegionException("The region " + encodedName +
+        throw new RegionAlreadyInTransitionException("The region " + encodedName +
           " was opening but not yet served. Opening is cancelled.");
       }
     } else if (Boolean.FALSE.equals(previous)) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/c84b1351/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerNoMaster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerNoMaster.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerNoMaster.java
index 14cae3c..b58fb0f 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerNoMaster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerNoMaster.java
@@ -402,7 +402,7 @@ public class TestRegionServerNoMaster {
       getRS().rpcServices.closeRegion(null, crr);
       Assert.assertTrue(false);
     } catch (ServiceException expected) {
-      Assert.assertTrue(expected.getCause() instanceof NotServingRegionException);
+      Assert.assertTrue(expected.getCause() instanceof RegionAlreadyInTransitionException);
     }
 
     // The close should have left the ZK state as it is: it's the job the AM to delete it


Mime
View raw message