Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 请问approximate size为0、approximate keys也为0的空region怎么清理?开启合并后这些region并没有进行合并
Production environment V5.1.0
After enabling Merge for the cluster, the number of empty regions decreases very slowly. Sampling some empty regions, I found that their approximate size and approximate keys are both 0.
How can these regions be merged, or how can they be cleaned up?
TiFlash is not set up.
Previously, I looked up some information and it seems that PD considers regions with approximate size and approximate keys of 0 to be in an abnormal state and will not merge them. Is this true? Also, I would like to know how such regions are generated? How can they be avoided or cleaned up?
If the default is to merge to the right, is there a way to set it to merge to the left?
It’s not normal for the count to be zero. These two metrics are estimates and not 100% accurate. They might be regions left after truncate drop, and you’ll have to wait for them to merge. You can first check the region’s table information from information_schema.tikv_region_status
or by using curl http://{TiDBIP}:10080/regions/{regionID}
.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.