Skip to content

Commit

Permalink
HBASE-24328 skip duplicate GCMultipleMergedRegionsProcedure while pre…
Browse files Browse the repository at this point in the history
…vious finished (#1629)

Signed-off-by: huaxiangsun <huaxiangsun@apache.org>
  • Loading branch information
nyl3532016 committed May 6, 2020
1 parent 6f059ec commit f4a446c
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,16 @@ protected Flow executeFromState(MasterProcedureEnv env, GCMergedRegionsState sta
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:
Expand Down

0 comments on commit f4a446c

Please sign in to comment.