PD log create merge region operator failed

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: PD日志 create merge region operator failed

| username: 巨化斑鸠

[TiDB Usage Environment] Testing
[TiDB Version] v6.5.8

[Encountered Issue: Problem Phenomenon and Impact] A large number of EMPTY REGIONS are not merging.

[Attachments: Screenshots/Logs/Monitoring]
[2024/05/27 09:32:37.494 +08:00] [DEBUG] [merge_checker.go:170] [“try to merge region”] [from=“id:2770148388 start_key:"7480000000000006FF385F698000000000FF0000010132373636FF37333435FF333437FF3700000000FB0000FD" end_key:"7480000000000006FF385F698000000000FF0000010132373734FF39343637FF393930FF3600000000FB0000FD" region_epoch:<conf_ver:2037365 version:2133 > peers:<id:2771380873 store_id:6555220 > peers:<id:2771842786 store_id:10 > peers:<id:13737835513 store_id:2 >”] [to=“id:2770377244 start_key:"7480000000000006FF385F698000000000FF0000010132373734FF39343637FF393930FF3600000000FB0000FD" end_key:"7480000000000006FF385F698000000000FF0000020146494E49FF53484544FF5F4C00FF0000000000F90146FF494E4953480000FDFF0380000000000000FF010396C84715F800FFD002000000000000F9" region_epoch:<conf_ver:2037371 version:2142 > peers:<id:2770378243 store_id:1 > peers:<id:13741803684 store_id:6555220 > peers:<id:14157997870 store_id:5 >”]
[2024/05/27 09:32:37.494 +08:00] [WARN] [merge_checker.go:175] [“create merge region operator failed”] [error=“no valid leader”]
[2024/05/27 09:32:37.494 +08:00] [DEBUG] [rule_checker.go:389] [“no replacement store”] [region-id=2770377244]
[2024/05/27 09:32:37.494 +08:00] [DEBUG] [rule_checker.go:389] [“no replacement store”] [region-id=2770377248]
[2024/05/27 09:32:37.494 +08:00] [DEBUG] [rule_checker.go:389] [“no replacement store”] [region-id=2770377252]
[2024/05/27 09:32:37.494 +08:00] [DEBUG] [rule_checker.go:389] [“no replacement store”] [region-id=2770377256]
[2024/05/27 09:32:37.494 +08:00] [DEBUG] [rule_checker.go:389] [“no replacement store”] [region-id=2770377260]
[2024/05/27 09:32:37.494 +08:00] [DEBUG] [rule_checker.go:389] [“no replacement store”] [region-id=2770377264]
[2024/05/27 09:32:37.494 +08:00] [DEBUG] [rule_checker.go:389] [“no replacement store”] [region-id=2770377268]

| username: TiDBer_小阿飞 | Original post link

  • Cross-table empty Regions cannot merge. You need to modify the [coprocessor] split-region-on-table = false parameter in TiKV to resolve this. In version 4.x, this parameter defaults to false. See case case-896.
  • If Region merge is slow, you can check the GrafanaPDoperator panel to see if there are any merge operators generated. You can appropriately increase the merge-schedule-limit parameter to speed up the merge.
    tidb-map/maps/diagnose-case-study/case896.md at master · pingcap/tidb-map · GitHub
| username: yytest | Original post link

Check PD configuration: Ensure that the PD configuration parameters are suitable for your workload. Pay special attention to parameters related to region merging, such as max-merge-region-size, max-merge-region-keys, and split-merge-interval.
Check TiKV node status: Use the pd-ctl tool to check the status of TiKV nodes and ensure that no nodes are in an unhealthy state.
Manually trigger merge: If possible, you can use the pd-ctl tool to manually trigger region merge operations.
Increase system resources: If the issue is due to system pressure, consider increasing the resources of TiKV nodes, such as CPU, memory, or disk space.

| username: 小龙虾爱大龙虾 | Original post link

Please send the monitoring for PD => Scheduler => Region merge checker / Filter source / Filter target.