diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/UnassignProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/UnassignProcedure.java index 740c7ff8824..c6b7e4b1180 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/UnassignProcedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/UnassignProcedure.java @@ -161,9 +161,12 @@ public class UnassignProcedure extends RegionTransitionProcedure { return false; } - // if the server is down, mark the operation as complete + // if the server is down, mark the operation as failed. region cannot be unassigned + // if server is down if (serverCrashed.get() || !isServerOnline(env, regionNode)) { - LOG.info("Server already down: " + this + "; " + regionNode.toShortString()); + LOG.warn("Server already down: " + this + "; " + regionNode.toShortString()); + setFailure("source region server not online", + new ServerCrashException(getProcId(), regionNode.getRegionLocation())); return false; } diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestServerCrashProcedure.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestServerCrashProcedure.java index 0a31a84b33d..9d6e765c224 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestServerCrashProcedure.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestServerCrashProcedure.java @@ -87,7 +87,6 @@ public class TestServerCrashProcedure { testRecoveryAndDoubleExecution(false, false); } - @Ignore // HBASE-18366... To be enabled again. @Test(timeout=60000) public void testRecoveryAndDoubleExecutionOnRsWithMeta() throws Exception { testRecoveryAndDoubleExecution(true, true);