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

Signed-off-by: Huaxiang Sun<huaxiangsun@apache.org>
This commit is contained in:
huaxiangsun 2020-05-07 14:11:44 -07:00 committed by GitHub
parent 93ca07971c
commit 2b2e6c7789
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 {
switch (state) {
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);
break;
case GC_MERGED_REGIONS_PURGE: