Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
prepareMergeRegion, it checks if one of merged parent regions is a merged child region and has not been GCed. If it is ready to GC, it will kick off a GCMultipleMergedRegionsProcedure and also start the MergeRegionProcedure. There is a race condition here. If MergeRegionProcedure finishes first, it will delete meta row for the merged child region. Then GCMultipleMergedRegionsProcedure runs, and because the newly added check, it thinks GC has been done and wont schedule GCRegionProcedure to clean up those merged parent regions. The end result is that these merged parent regions are left as orphans on Filesystem.
The proposed solution is to avoid being so aggressive, if it needs to kick off GCMultipleMergedRegionsProcedure, then abort MergeRegionProcedure and user can try MergeRegionProcedure later.