From 8078d7828d464b03307bb758f71e6bef42e84977 Mon Sep 17 00:00:00 2001 From: Liuxiaozhen12 <82579298+Liuxiaozhen12@users.noreply.github.com> Date: Wed, 4 Aug 2021 18:28:02 +0800 Subject: [PATCH 1/7] add notice about scaling in pd node --- scale-tidb-using-tiup.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scale-tidb-using-tiup.md b/scale-tidb-using-tiup.md index 9e0651c7ac009..ddf14a9a27d3f 100644 --- a/scale-tidb-using-tiup.md +++ b/scale-tidb-using-tiup.md @@ -247,6 +247,10 @@ If you want to remove a TiKV node from the `10.0.1.5` host, take the following s > > You can take similar steps to remove the TiDB and PD node. +> **Note:** +> +> The PD Client in TiKV caches the list of PD nodes. The current version of TiKV has a mechanism to automatically and regularly update PD nodes, which can help avoid that the list of PD nodes cached by TiKV is old. However, after expanding new PD, you should try to avoid directly shrinking all PD nodes existing before the expansion. If necessary, before making all the previously existing PD nodes offline, make sure to switch the PD leader to the newly expanded PD nodes. + 1. View the node ID information: {{< copyable "shell-regular" >}} From f239e9d1bc18ab3f1fda40bbf9bbe69027b1f655 Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Thu, 5 Aug 2021 18:57:41 +0800 Subject: [PATCH 2/7] Update scale-tidb-using-tiup.md Co-authored-by: Allen Zhong --- scale-tidb-using-tiup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scale-tidb-using-tiup.md b/scale-tidb-using-tiup.md index ddf14a9a27d3f..e529869c43966 100644 --- a/scale-tidb-using-tiup.md +++ b/scale-tidb-using-tiup.md @@ -249,7 +249,7 @@ If you want to remove a TiKV node from the `10.0.1.5` host, take the following s > **Note:** > -> The PD Client in TiKV caches the list of PD nodes. The current version of TiKV has a mechanism to automatically and regularly update PD nodes, which can help avoid that the list of PD nodes cached by TiKV is old. However, after expanding new PD, you should try to avoid directly shrinking all PD nodes existing before the expansion. If necessary, before making all the previously existing PD nodes offline, make sure to switch the PD leader to the newly expanded PD nodes. +> The PD Client in TiKV caches the list of PD nodes. The current version of TiKV has a mechanism to automatically and regularly update PD nodes, which can help avoid that the list of PD nodes cached by TiKV is expired. However, after expanding new PD, you should try to avoid directly shrinking all PD nodes existing before the expansion. If necessary, before making all the previously existing PD nodes offline, make sure to switch the PD leader to the newly expanded PD nodes. 1. View the node ID information: From b3aab76ce09572d4e3e69e3aa0036c8977bb68f7 Mon Sep 17 00:00:00 2001 From: Liuxiaozhen12 <82579298+Liuxiaozhen12@users.noreply.github.com> Date: Thu, 5 Aug 2021 19:36:18 +0800 Subject: [PATCH 3/7] Update scale-tidb-using-tiup.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- scale-tidb-using-tiup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scale-tidb-using-tiup.md b/scale-tidb-using-tiup.md index e529869c43966..eacc238f7ee4a 100644 --- a/scale-tidb-using-tiup.md +++ b/scale-tidb-using-tiup.md @@ -249,7 +249,7 @@ If you want to remove a TiKV node from the `10.0.1.5` host, take the following s > **Note:** > -> The PD Client in TiKV caches the list of PD nodes. The current version of TiKV has a mechanism to automatically and regularly update PD nodes, which can help avoid that the list of PD nodes cached by TiKV is expired. However, after expanding new PD, you should try to avoid directly shrinking all PD nodes existing before the expansion. If necessary, before making all the previously existing PD nodes offline, make sure to switch the PD leader to the newly expanded PD nodes. +> The PD Client in TiKV caches the list of PD nodes. The current version of TiKV has a mechanism to automatically and regularly update PD nodes, which can help mitigate the issue of an expired list of PD nodes cached by TiKV. However, after scaling out PD, you should try to avoid directly removing all PD nodes at once that exist before the scaling. If necessary, before making all the previously existing PD nodes offline, make sure to switch the PD leader to a newly added PD node. 1. View the node ID information: From 6c6afe5f76f11d2c85005318d8cc242bed3cb14b Mon Sep 17 00:00:00 2001 From: Liuxiaozhen12 <82579298+Liuxiaozhen12@users.noreply.github.com> Date: Mon, 23 Aug 2021 18:41:04 +0800 Subject: [PATCH 4/7] Update scale-tidb-using-tiup.md --- scale-tidb-using-tiup.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scale-tidb-using-tiup.md b/scale-tidb-using-tiup.md index eacc238f7ee4a..b7042f8bc0974 100644 --- a/scale-tidb-using-tiup.md +++ b/scale-tidb-using-tiup.md @@ -249,8 +249,11 @@ If you want to remove a TiKV node from the `10.0.1.5` host, take the following s > **Note:** > -> The PD Client in TiKV caches the list of PD nodes. The current version of TiKV has a mechanism to automatically and regularly update PD nodes, which can help mitigate the issue of an expired list of PD nodes cached by TiKV. However, after scaling out PD, you should try to avoid directly removing all PD nodes at once that exist before the scaling. If necessary, before making all the previously existing PD nodes offline, make sure to switch the PD leader to a newly added PD node. - +> The PD Client in TiKV caches the list of PD nodes. +> +> + In versions before v4.0.3, TiKV cannot automatically and regularly update the cache of the PD node list regularly. Only after the PD leader switches or TiKV restarts to load the latest configuration, the cache can be updated. To avoid the issue of an expired list of PD nodes cached by TiKV, the PD cluster should contain at least one PD node that existed before removing and scaling PD nodes. If this condition is not met, you need to manually perform the PD transfer leader operation to update the PD cache list in TiKV. +> +> + In versions v4.0.3 and later, TiKV has a mechanism to automatically and regularly update PD nodes, which can help mitigate the issue of an expired list of PD nodes cached by TiKV. However, after scaling out PD, you should try to avoid directly removing all PD nodes at once that exist before the scaling. If necessary, before making all the previously existing PD nodes offline, make sure to switch the PD leader to a newly added PD node. 1. View the node ID information: {{< copyable "shell-regular" >}} From 62ec74586c2f6070d4c8812892034480dea12219 Mon Sep 17 00:00:00 2001 From: Liuxiaozhen12 <82579298+Liuxiaozhen12@users.noreply.github.com> Date: Mon, 23 Aug 2021 18:42:19 +0800 Subject: [PATCH 5/7] Update scale-tidb-using-tiup.md --- scale-tidb-using-tiup.md | 1 + 1 file changed, 1 insertion(+) diff --git a/scale-tidb-using-tiup.md b/scale-tidb-using-tiup.md index b7042f8bc0974..d1b5deec71c08 100644 --- a/scale-tidb-using-tiup.md +++ b/scale-tidb-using-tiup.md @@ -254,6 +254,7 @@ If you want to remove a TiKV node from the `10.0.1.5` host, take the following s > + In versions before v4.0.3, TiKV cannot automatically and regularly update the cache of the PD node list regularly. Only after the PD leader switches or TiKV restarts to load the latest configuration, the cache can be updated. To avoid the issue of an expired list of PD nodes cached by TiKV, the PD cluster should contain at least one PD node that existed before removing and scaling PD nodes. If this condition is not met, you need to manually perform the PD transfer leader operation to update the PD cache list in TiKV. > > + In versions v4.0.3 and later, TiKV has a mechanism to automatically and regularly update PD nodes, which can help mitigate the issue of an expired list of PD nodes cached by TiKV. However, after scaling out PD, you should try to avoid directly removing all PD nodes at once that exist before the scaling. If necessary, before making all the previously existing PD nodes offline, make sure to switch the PD leader to a newly added PD node. + 1. View the node ID information: {{< copyable "shell-regular" >}} From 860b83aadc0f9af35ac38f18c1adc54936549c01 Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Mon, 30 Aug 2021 11:05:16 +0800 Subject: [PATCH 6/7] Update scale-tidb-using-tiup.md --- scale-tidb-using-tiup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scale-tidb-using-tiup.md b/scale-tidb-using-tiup.md index d1b5deec71c08..c5f5c7c6445b5 100644 --- a/scale-tidb-using-tiup.md +++ b/scale-tidb-using-tiup.md @@ -253,7 +253,7 @@ If you want to remove a TiKV node from the `10.0.1.5` host, take the following s > > + In versions before v4.0.3, TiKV cannot automatically and regularly update the cache of the PD node list regularly. Only after the PD leader switches or TiKV restarts to load the latest configuration, the cache can be updated. To avoid the issue of an expired list of PD nodes cached by TiKV, the PD cluster should contain at least one PD node that existed before removing and scaling PD nodes. If this condition is not met, you need to manually perform the PD transfer leader operation to update the PD cache list in TiKV. > -> + In versions v4.0.3 and later, TiKV has a mechanism to automatically and regularly update PD nodes, which can help mitigate the issue of an expired list of PD nodes cached by TiKV. However, after scaling out PD, you should try to avoid directly removing all PD nodes at once that exist before the scaling. If necessary, before making all the previously existing PD nodes offline, make sure to switch the PD leader to a newly added PD node. +> + Since v4.0.3, TiKV has a mechanism to automatically and regularly update PD nodes, which can help mitigate the issue of an expired list of PD nodes cached by TiKV. However, after scaling out PD, you should try to avoid directly removing all PD nodes at once that existed before the scaling. If necessary, before making all the previously existing PD nodes offline, make sure to switch the PD leader to a newly added PD node. 1. View the node ID information: From 563b00632302d545929222009b9366ae60891e1d Mon Sep 17 00:00:00 2001 From: Liuxiaozhen12 <82579298+Liuxiaozhen12@users.noreply.github.com> Date: Mon, 30 Aug 2021 11:18:14 +0800 Subject: [PATCH 7/7] Update scale-tidb-using-tiup.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- scale-tidb-using-tiup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scale-tidb-using-tiup.md b/scale-tidb-using-tiup.md index c5f5c7c6445b5..be664a6e9d745 100644 --- a/scale-tidb-using-tiup.md +++ b/scale-tidb-using-tiup.md @@ -251,7 +251,7 @@ If you want to remove a TiKV node from the `10.0.1.5` host, take the following s > > The PD Client in TiKV caches the list of PD nodes. > -> + In versions before v4.0.3, TiKV cannot automatically and regularly update the cache of the PD node list regularly. Only after the PD leader switches or TiKV restarts to load the latest configuration, the cache can be updated. To avoid the issue of an expired list of PD nodes cached by TiKV, the PD cluster should contain at least one PD node that existed before removing and scaling PD nodes. If this condition is not met, you need to manually perform the PD transfer leader operation to update the PD cache list in TiKV. +> + In versions earlier than v4.0.3, TiKV does not automatically and regularly update the cache of the PD node list. The cache is updated only after the PD leader switches or TiKV restarts to load the latest configuration. To avoid the issue of an expired list of PD nodes cached by TiKV, the PD cluster should contain at least one PD node that existed before the scaling-in or scaling-out. If this condition is not met, you need to manually perform the PD leader transfer to update the PD cache list in TiKV. > > + Since v4.0.3, TiKV has a mechanism to automatically and regularly update PD nodes, which can help mitigate the issue of an expired list of PD nodes cached by TiKV. However, after scaling out PD, you should try to avoid directly removing all PD nodes at once that existed before the scaling. If necessary, before making all the previously existing PD nodes offline, make sure to switch the PD leader to a newly added PD node.