HBASE-20015 TestMergeTableRegionsProcedure and TestRegionMergeTransactionOnCluster flakey

This commit is contained in:
Michael Stack 2018-02-16 22:59:32 -08:00
parent 8be0696320
commit 72193650dd
2 changed files with 11 additions and 4 deletions

View File

@ -255,10 +255,16 @@ public class MergeTableRegionsProcedure
throw new UnsupportedOperationException(this + " unhandled state=" + state); throw new UnsupportedOperationException(this + " unhandled state=" + state);
} }
} catch (IOException e) { } catch (IOException e) {
LOG.warn("Error trying to merge regions " + RegionInfo.getShortNameToLog(regionsToMerge) + String msg = "Error trying to merge regions " +
" in the table " + getTableName() + " (in state=" + state + ")", e); RegionInfo.getShortNameToLog(regionsToMerge) + " in the table " + getTableName() +
" (in state=" + state + ")";
setFailure("master-merge-regions", e); 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; return Flow.HAS_MORE_STATE;
} }

View File

@ -270,6 +270,7 @@ public class SplitTableRegionProcedure
} else { } else {
LOG.error(msg, e); LOG.error(msg, e);
setFailure(e); setFailure(e);
setFailure("master-split-regions", e);
} }
} }
// if split fails, need to call ((HRegion)parent).clearSplit() when it is a force split // if split fails, need to call ((HRegion)parent).clearSplit() when it is a force split