Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pd: add patrol-region-worker-count #19600

Merged
merged 5 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/ps/issues) on GitHub.
Oreoxmt marked this conversation as resolved.
Show resolved Hide resolved

+ Controls the number of concurrent operators created by the checker when inspecting the health state of a Region. Normally, you do not need to adjust this configuration.
Oreoxmt marked this conversation as resolved.
Show resolved Hide resolved
+ 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 checker to 10ms
Oreoxmt marked this conversation as resolved.
Show resolved Hide resolved
```

- `patrol-region-worker-count` controls the number of concurrent operators 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.
Oreoxmt marked this conversation as resolved.
Show resolved Hide resolved

```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
Loading