HBASE-18491 [AMv2] Fail UnassignProcedure if source Region Server is not online.

The patch also enables TestServerCrashProcedure.testRecoveryAndDoubleExecutionOnRsWithMeta()

Signed-off-by: Michael Stack <stack@apache.org>
This commit is contained in:
Umesh Agashe 2017-08-01 12:36:47 -07:00 committed by Michael Stack
parent 5e21e30682
commit 3f540f3801
2 changed files with 5 additions and 3 deletions

View File

@ -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;
}

View File

@ -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);