tikv / tikv/pd

patrol-region-worker-count can exceed schedule limits

Open
#10,926 0 comments 0 reactions 0 assignees View on GitHub
component/checker component/schedule severity/moderate type/bug
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.