Skip to content

Commit

Permalink
pd: add patrol-region-worker-count (pingcap#19600)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oreoxmt authored Dec 11, 2024
1 parent 5e9142e commit 85ce20d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
3 changes: 2 additions & 1 deletion dynamic-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ The following PD configuration items can be modified dynamically:
| `cluster-version` | The cluster version |
| `schedule.max-merge-region-size` | Controls the size limit of `Region Merge` (in MiB) |
| `schedule.max-merge-region-keys` | Specifies the maximum numbers of the `Region Merge` keys |
| `schedule.patrol-region-interval` | Determines the frequency at which `replicaChecker` checks the health state of a Region |
| `schedule.patrol-region-interval` | Determines the frequency at which the checker inspects the health state of a Region |
| `scheduler.patrol-region-worker-count` | Controls the number of concurrent operators created by the checker when inspecting the health state of a Region |
| `schedule.split-merge-interval` | Determines the time interval of performing split and merge operations on the same Region |
| `schedule.max-snapshot-count` | Determines the maximum number of snapshots that a single store can send or receive at the same time |
| `schedule.max-pending-peer-count` | Determines the maximum number of pending peers in a single store |
Expand Down
11 changes: 10 additions & 1 deletion pd-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,18 @@ Configuration items related to scheduling
### `patrol-region-interval`
+ Controls the running frequency at which `replicaChecker` checks the health state of a Region. The smaller this value is, the faster `replicaChecker` runs. Normally, you do not need to adjust this parameter.
+ Controls the running frequency at which the checker inspects the health state of a Region. The smaller this value is, the faster the checker runs. Normally, you do not need to adjust this configuration.
+ Default value: `10ms`
### `patrol-region-worker-count` <span class="version-mark">New in v8.5.0</span>
> **Warning:**
>
> Setting this configuration item to a value greater than 1 enables concurrent checks. This is an experimental feature. It is not recommended that you use it in the production environment. This feature might be changed or removed without prior notice. If you find a bug, you can report an [issue](https://github.com/tikv/pd/issues) on GitHub.
+ Controls the number of concurrent [operators](/glossary.md#operator) created by the checker when inspecting the health state of a Region. Normally, you do not need to adjust this configuration.
+ Default value: `1`
### `split-merge-interval`
+ Controls the time interval between the `split` and `merge` operations on the same Region. That means a newly split Region will not be merged for a while.
Expand Down
10 changes: 8 additions & 2 deletions pd-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,16 @@ Usage:
config set region-score-formula-version v2
```
- `patrol-region-interval` controls the execution frequency that `replicaChecker` checks the health status of Regions. A shorter interval indicates a higher execution frequency. Generally, you do not need to adjust it.
- `patrol-region-interval` controls the execution frequency that the checker inspects the health status of Regions. A shorter interval indicates a higher execution frequency. Generally, you do not need to adjust it.
```bash
config set patrol-region-interval 10ms // Set the execution frequency of replicaChecker to 10ms
config set patrol-region-interval 10ms // Set the execution frequency of the checker to 10ms
```
- `patrol-region-worker-count` controls the number of concurrent [operators](/glossary.md#operator) created by the checker when inspecting the health state of a Region. Normally, you do not need to adjust this configuration. Setting this configuration item to a value greater than 1 enables concurrent checks. Currently, this feature is experimental, and it is not recommended that you use it in the production environment.
```bash
config set patrol-region-worker-count 2 // Set the checker concurrency to 2
```
- `max-store-down-time` controls the time that PD decides the disconnected store cannot be restored if exceeded. If PD does not receive heartbeats from a store within the specified period of time, PD adds replicas in other nodes.
Expand Down

0 comments on commit 85ce20d

Please sign in to comment.