hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject hbase git commit: HBASE-16093 Fix splits failed before creating daughter regions leave meta inconsistent
Date Wed, 13 Jul 2016 06:09:28 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 7ad167875 -> 3a6698e87


HBASE-16093 Fix splits failed before creating daughter regions leave meta inconsistent

Amending-Author: Andrew Purtell <apurtell@apache.org>


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

Branch: refs/heads/0.98
Commit: 3a6698e878fba7340f506b536d74aa0a13ebe0a2
Parents: 7ad1678
Author: Elliott Clark <eclark@apache.org>
Authored: Thu Jun 23 11:27:44 2016 -0700
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Tue Jul 12 23:09:15 2016 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hbase/master/AssignmentManager.java | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/3a6698e8/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
index 48c92e0..475d9ae 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
@@ -3794,9 +3794,19 @@ public class AssignmentManager extends ZooKeeperListener {
         return "Failed to record the splitting in meta";
       }
     } else if (code == TransitionCode.SPLIT_REVERTED) {
+      // Always bring the parent back online. Even if it's not offline
+      // There's no harm in making it online again.
       regionOnline(p, sn);
-      regionOffline(a);
-      regionOffline(b);
+
+      // Only offline the region if they are known to exist.
+      RegionState regionStateA = regionStates.getRegionState(a);
+      RegionState regionStateB = regionStates.getRegionState(b);
+      if (regionStateA != null) {
+        regionOffline(a);
+      }
+      if (regionStateB != null) {
+        regionOffline(b);
+      }
 
       if (isTableDisabledOrDisabling(p.getTable())) {
         invokeUnAssign(p);


Mime
View raw message