Repository: hbase
Updated Branches:
  refs/heads/branch-2 8be069632 -> 3ea2ffcd5


HBASE-20015 TestMergeTableRegionsProcedure and 
TestRegionMergeTransactionOnCluster flakey


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

Branch: refs/heads/branch-2
Commit: 72193650dde2225e85d7bdb74b24ad39367145da
Parents: 8be0696
Author: Michael Stack <st...@apache.org>
Authored: Fri Feb 16 22:59:32 2018 -0800
Committer: Michael Stack <st...@apache.org>
Committed: Fri Feb 16 22:59:32 2018 -0800

----------------------------------------------------------------------
 .../master/assignment/MergeTableRegionsProcedure.java | 14 ++++++++++----
 .../master/assignment/SplitTableRegionProcedure.java  |  1 +
 2 files changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/72193650/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/MergeTableRegionsProcedure.java
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/MergeTableRegionsProcedure.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/MergeTableRegionsProcedure.java
index 4bccab7..baa399b 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/MergeTableRegionsProcedure.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/MergeTableRegionsProcedure.java
@@ -255,10 +255,16 @@ public class MergeTableRegionsProcedure
         throw new UnsupportedOperationException(this + " unhandled state=" + 
state);
       }
     } catch (IOException e) {
-      LOG.warn("Error trying to merge regions " + 
RegionInfo.getShortNameToLog(regionsToMerge) +
-        " in the table " + getTableName() + " (in state=" + state + ")", e);
-
-      setFailure("master-merge-regions", e);
+       String msg = "Error trying to merge regions " +
+           RegionInfo.getShortNameToLog(regionsToMerge) + " in the table " + 
getTableName() +
+           " (in state=" + state + ")";
+      if (!isRollbackSupported(state)) {
+        // We reach a state that cannot be rolled back. We just need to keep 
retry.
+        LOG.warn(msg, e);
+      } else {
+        LOG.error(msg, e);
+        setFailure("master-merge-regions", e);
+      }
     }
     return Flow.HAS_MORE_STATE;
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/72193650/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
index c139566..e898d6a 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java
@@ -270,6 +270,7 @@ public class SplitTableRegionProcedure
       } else {
         LOG.error(msg, e);
         setFailure(e);
+        setFailure("master-split-regions", e);
       }
     }
     // if split fails,  need to call ((HRegion)parent).clearSplit() when it is 
a force split

Reply via email to