patrol-region-worker-count can exceed schedule limits
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 783
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 36
Description
## Bug Report
When `schedule.patrol-region-worker-count` is greater than 1, multiple patrol workers can check the current operator count concurrently and all generate operators before any worker adds its operator to the operator controller.
As a result, patrol region checking can exceed schedule limits such as `replica-schedule-limit`, and similar races can affect merge or affinity operators.
## Expected Behavior
Concurrent patrol workers should respect the configured schedule limits.
## Affected Area
- `pkg/schedule/checker.Controller.PatrolRegions`
- operator admission from patrol region workers
## Related PR
Fix: https://github.com/tikv/pd/pull/10925
Contributor guide
Research direction
Start at pkg/schedule/checker.Controller.PatrolRegions and trace how patrol-region workers check operator counts and admit operators. Review the related PR #10925 for the work already underway, then verify that concurrent workers cannot exceed configured schedule limits, including replica, merge, and affinity cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100