From 2a81ee19624c5a38dba76cedc78671c888c45fec Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Tue, 20 Feb 2024 17:30:28 +0800 Subject: [PATCH] update placement-rules doc about max-replica (#16417) --- configure-placement-rules.md | 9 +++++---- tiflash/troubleshoot-tiflash.md | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/configure-placement-rules.md b/configure-placement-rules.md index eb5312c6f115e..dd77b8ac39746 100644 --- a/configure-placement-rules.md +++ b/configure-placement-rules.md @@ -78,7 +78,7 @@ The Placement Rules feature is enabled by default in v5.0 and later versions of enable-placement-rules = true ``` -In this way, PD enables this feature after the cluster is successfully bootstrapped and generates corresponding rules according to the `max-replicas` and `location-labels` configurations: +In this way, PD enables this feature after the cluster is successfully bootstrapped and generates corresponding rules according to the [`max-replicas`](/pd-configuration-file.md#max-replicas), [`location-labels`](/pd-configuration-file.md#location-labels), and [`isolation-level`](/pd-configuration-file.md#isolation-level) configurations: {{< copyable "" >}} @@ -103,11 +103,12 @@ For a bootstrapped cluster, you can also enable Placement Rules dynamically thro pd-ctl config placement-rules enable ``` -PD also generates default rules based on the `max-replicas` and `location-labels` configurations. +PD also generates default rules based on the `max-replicas`, `location-labels`, and `isolation-level` configurations. > **Note:** > -> After enabling Placement Rules, the previously configured `max-replicas` and `location-labels` no longer take effect. To adjust the replica policy, use the interface related to Placement Rules. +> - When Placement Rules are enabled and multiple rules exist, the previously configured `max-replicas`, `location-labels`, and `isolation-level` no longer take effect. To adjust the replica policy, use the interface related to Placement Rules. +> - When Placement Rules are enabled and only one default rule exists, TiDB will automatically update this default rule when `max-replicas`, `location-labels`, or `isolation-level` configurations are changed. ### Disable Placement Rules @@ -121,7 +122,7 @@ pd-ctl config placement-rules disable > **Note:** > -> After disabling Placement Rules, PD uses the original `max-replicas` and `location-labels` configurations. The modification of rules (when Placement Rules is enabled) will not update these two 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. +> 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. ### Set rules using pd-ctl diff --git a/tiflash/troubleshoot-tiflash.md b/tiflash/troubleshoot-tiflash.md index d2c0b6c139e8c..e5737061b1600 100644 --- a/tiflash/troubleshoot-tiflash.md +++ b/tiflash/troubleshoot-tiflash.md @@ -75,7 +75,8 @@ This is because TiFlash is in an abnormal state caused by configuration errors o > **Note:** > - > After the [placement rules](/configure-placement-rules.md) feature is enabled, the previously configured `max-replicas` and `location-labels` no longer take effect. To adjust the replica policy, use the interface related to placement rules. + > - When [Placement Rules](/configure-placement-rules.md) are enabled and multiple rules exist, the previously configured [`max-replicas`](/pd-configuration-file.md#max-replicas), [`location-labels`](/pd-configuration-file.md#location-labels), and [`isolation-level`](/pd-configuration-file.md#isolation-level) no longer take effect. To adjust the replica policy, use the interface related to Placement Rules. + > - When [Placement Rules](/configure-placement-rules.md) are enabled and only one default rule exists, TiDB will automatically update this default rule when `max-replicas`, `location-labels`, or `isolation-level` configurations are changed. 6. Check whether the remaining disk space of the machine (where `store` of the TiFlash node is) is sufficient. By default, when the remaining disk space is less than 20% of the `store` capacity (which is controlled by the `low-space-ratio` parameter), PD cannot schedule data to this TiFlash node.