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:
parent
5e21e30682
commit
3f540f3801
|
@ -161,9 +161,12 @@ public class UnassignProcedure extends RegionTransitionProcedure {
|
||||||
return false;
|
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)) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,6 @@ public class TestServerCrashProcedure {
|
||||||
testRecoveryAndDoubleExecution(false, false);
|
testRecoveryAndDoubleExecution(false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore // HBASE-18366... To be enabled again.
|
|
||||||
@Test(timeout=60000)
|
@Test(timeout=60000)
|
||||||
public void testRecoveryAndDoubleExecutionOnRsWithMeta() throws Exception {
|
public void testRecoveryAndDoubleExecutionOnRsWithMeta() throws Exception {
|
||||||
testRecoveryAndDoubleExecution(true, true);
|
testRecoveryAndDoubleExecution(true, true);
|
||||||
|
|
Loading…
Reference in New Issue