HBASE-24328 skip duplicate GCMultipleMergedRegionsProcedure while previous finished (#1629)

Signed-off-by: huaxiangsun <huaxiangsun@apache.org>
This commit is contained in:
niuyulin 2020-05-06 12:06:49 -05:00 committed by GitHub
parent 6f059ecff0
commit f4a446c3d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 1 deletions

View File

@ -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: