Skip to content

Commit d115cc3

Browse files
committed
HBASE-25854 Remove redundant AM in-memory state changes in CatalogJanitor
In CatalogJanitor we schedule GCRegionProcedure to clean up both filesystem and in-memory state after a split, and GCMultipleMergedRegionsProcedure to do the same for merges. Both of these procedures clean up in-memory state, but CatalogJanitor also does this redundantly just after scheduling the procedures. The cleanup should be done in only one place. Presumably we are using the procedures to do it in a principled way. Remove the redundancy in CatalogJanitor and fix any follow on issues, like test failures.
1 parent 17193da commit d115cc3

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

hbase-server/src/main/java/org/apache/hadoop/hbase/master/janitor/CatalogJanitor.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,6 @@ private boolean cleanMergeRegion(final RegionInfo mergedRegion, List<RegionInfo>
254254
ProcedureExecutor<MasterProcedureEnv> pe = this.services.getMasterProcedureExecutor();
255255
pe.submitProcedure(
256256
new GCMultipleMergedRegionsProcedure(pe.getEnvironment(), mergedRegion, parents));
257-
for (RegionInfo ri : parents) {
258-
// The above scheduled GCMultipleMergedRegionsProcedure does the below.
259-
// Do we need this?
260-
this.services.getAssignmentManager().getRegionStates().deleteRegion(ri);
261-
this.services.getServerManager().removeRegion(ri);
262-
}
263257
return true;
264258
}
265259
return false;
@@ -318,9 +312,6 @@ static boolean cleanParent(MasterServices services, RegionInfo parent, Result ro
318312
daughterA + ", " + daughterB + " -- no longer hold references");
319313
ProcedureExecutor<MasterProcedureEnv> pe = services.getMasterProcedureExecutor();
320314
pe.submitProcedure(new GCRegionProcedure(pe.getEnvironment(), parent));
321-
// Remove from in-memory states
322-
services.getAssignmentManager().getRegionStates().deleteRegion(parent);
323-
services.getServerManager().removeRegion(parent);
324315
return true;
325316
}
326317
return false;

0 commit comments

Comments
 (0)