Repository navigation
Clarify hotspot scheduling isolation behavior #24798
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
base: master
Are you sure you want to change the base?
Changes from all commits
5677888
b1001cb
e0fb919
5c27e0f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -124,6 +124,25 @@ pd-ctl config placement-rules disable | |
| > | ||
| > After disabling Placement Rules, PD uses the original `max-replicas`, `location-labels`, and `isolation-level` configurations. The modification of rules (when Placement Rules is enabled) will not update these three configurations in real time. In addition, all the rules that have been configured remain in PD and will be used the next time you enable Placement Rules. | ||
|
|
||
| ### Configure host-level replica isolation | ||
|
|
||
| Host isolation places replicas of the same Region on different physical hosts. Configure it as follows: | ||
|
|
||
| 1. Configure topology labels for each TiKV store so that they match the actual deployment. For more information, see [Configure `labels` for TiKV, TiFlash, and TiDB](/schedule-replicas-by-topology-labels.md#configure-labels-for-tikv-tiflash-and-tidb). All stores on the same physical host must use the same `host` value, and different physical hosts must use different `host` values. If you also use upper-level labels such as `zone` or `rack`, make sure those labels also reflect the physical topology accurately. | ||
| 2. Configure the replica placement policy according to how you use Placement Rules: | ||
|
|
||
| | Scenario | Configuration | | ||
| | --- | --- | | ||
| | Placement Rules disabled | Include `host` in `replication.location-labels` and set `replication.isolation-level = "host"` | | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add the location-replacement prerequisite to the disabled-rules procedure. If Placement Rules are disabled and some replicas of a Region are on the same host, the labels and isolation level in this procedure do not move those replicas. PD does not increase a replica's isolation through scheduling while |
||
| | Placement Rules enabled with only the default rule | Include `host` in `replication.location-labels` and set `replication.isolation-level = "host"`. PD then updates the default rule automatically. | | ||
| | Placement Rules enabled with custom rules | Include `host` in each relevant rule's `location_labels` and set `isolation_level = "host"`. Cluster-level replication settings do not override custom rules. | | ||
|
|
||
| Each rule's isolation settings apply only to the replicas matched by that rule and do not automatically guarantee isolation across rules. If voter replicas of the same Region are managed by multiple rules, you can use `label_constraints` to restrict which hosts each rule can select based on store labels. For example, if one rule can select only `host-a` and `host-b`, and another can select only `host-c` and `host-d`, replicas managed by the two rules cannot share a host. | ||
|
|
||
| > **Note:** | ||
| > | ||
| > Even after you complete this configuration, hot-region migration can still place multiple replicas of the same Region on the same host. For the detailed limitations and the configuration that applies when you need only host isolation, see [Hot region scheduling and replica isolation](/best-practices/pd-scheduling-best-practices.md#hot-region-scheduling-and-replica-isolation). | ||
|
|
||
| ### Set rules using pd-ctl | ||
|
|
||
| > **Note:** | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explain how to obtain the single voter rule.
If a cluster has retained multiple rules, enabling Placement Rules restores those rules; it does not consolidate them into one voter rule. Step 3 then has no single rule to configure. Direct readers to inspect and, if necessary, adjust the matching rules before continuing, while preserving the warning about existing policies.
As per coding guidelines, procedural steps must “make each step a clear action.”
Source: Coding guidelines