HBASE-24328 skip duplicate GCMultipleMergedRegionsProcedure while previous finished (#1629)
Signed-off-by: huaxiangsun <huaxiangsun@apache.org>
This commit is contained in:
parent
6f059ecff0
commit
f4a446c3d2
|
@ -97,7 +97,16 @@ public class GCMultipleMergedRegionsProcedure extends
|
||||||
try {
|
try {
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case GC_MERGED_REGIONS_PREPARE:
|
case GC_MERGED_REGIONS_PREPARE:
|
||||||
// Nothing to do to prepare.
|
// If GCMultipleMergedRegionsProcedure processing is slower than the CatalogJanitor's scan
|
||||||
|
// interval, it will end resubmitting GCMultipleMergedRegionsProcedure for the same
|
||||||
|
// region, we can skip duplicate GCMultipleMergedRegionsProcedure while previous finished
|
||||||
|
List<RegionInfo> parents = MetaTableAccessor.getMergeRegions(
|
||||||
|
env.getMasterServices().getConnection(), mergedChild.getRegionName());
|
||||||
|
if (parents == null || parents.isEmpty()) {
|
||||||
|
LOG.info("Region=" + mergedChild.getShortNameToLog()
|
||||||
|
+ " info:merge qualifier has been deleted");
|
||||||
|
return Flow.NO_MORE_STATE;
|
||||||
|
}
|
||||||
setNextState(GCMergedRegionsState.GC_MERGED_REGIONS_PURGE);
|
setNextState(GCMergedRegionsState.GC_MERGED_REGIONS_PURGE);
|
||||||
break;
|
break;
|
||||||
case GC_MERGED_REGIONS_PURGE:
|
case GC_MERGED_REGIONS_PURGE:
|
||||||
|
|
Loading…
Reference in New Issue