Too many peers may cause rule-checker to be stuck by fitRegion
Open
type/enhancement
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 783
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 36
Description
## Bug Report
#6662 also exposes another problem. When too many peers are replicated to the redundant TiKV stores, the following code of `rule-checker` will generate a huge number of loops, resulting in its almost stuck and unable to complete the patrol of the region for a long time.
https://github.com/tikv/pd/blob/ac31f8730bab657570ce44bfc28c8c3c63a3d5a3/pkg/schedule/placement/fit.go#L269-L283
If a region owns 36 peers, the `limit` here will reach 68719476735. We may need to optimize this kind of case to make sure `fitRegion` could be finished in a reasonable time.
Contributor guide
Assessment
This issue has not been assessed yet.