From d6180805d9191824fa13cc6d42c3ec1305cd63a1 Mon Sep 17 00:00:00 2001 From: yiduoyunQ <719547995@qq.com> Date: Mon, 4 Dec 2023 13:42:31 +0800 Subject: [PATCH 1/2] fix-pd-recover --- en/pd-recover.md | 11 +++-------- zh/pd-recover.md | 11 +++-------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/en/pd-recover.md b/en/pd-recover.md index ddb466201..c42bfee90 100644 --- a/en/pd-recover.md +++ b/en/pd-recover.md @@ -202,14 +202,7 @@ Check configuration. The following command uses placement rules as an example: kubectl -n ${namespace} exec -it ${cluster_name}-pd-0 -- ./pd-ctl config placement-rules show ``` -### Step 6. Restart TiDB and TiKV - -Use the following commands to restart the TiDB and TiKV clusters: - -```shell -kubectl delete pod -l app.kubernetes.io/component=tidb,app.kubernetes.io/instance=${cluster_name} -n ${namespace} && -kubectl delete pod -l app.kubernetes.io/component=tikv,app.kubernetes.io/instance=${cluster_name} -n ${namespace} -``` +Now TiDB cluster is recovered. ## Scenarios 2: All PD nodes are down and cannot be recovered @@ -371,3 +364,5 @@ Use the following commands to restart the TiDB and TiKV clusters: kubectl delete pod -l app.kubernetes.io/component=tidb,app.kubernetes.io/instance=${cluster_name} -n ${namespace} && kubectl delete pod -l app.kubernetes.io/component=tikv,app.kubernetes.io/instance=${cluster_name} -n ${namespace} ``` + +Now TiDB cluster is recovered. diff --git a/zh/pd-recover.md b/zh/pd-recover.md index dd0c6aa62..117278679 100644 --- a/zh/pd-recover.md +++ b/zh/pd-recover.md @@ -202,14 +202,7 @@ kubectl -n ${namespace} exec -it ${cluster_name}-pd-0 -- ./pd-ctl health kubectl -n ${namespace} exec -it ${cluster_name}-pd-0 -- ./pd-ctl config placement-rules show ``` -### 第 6 步:重启 TiDB 和 TiKV - -使用以下命令重启 TiDB 和 TiKV 实例: - -```shell -kubectl delete pod -l app.kubernetes.io/component=tidb,app.kubernetes.io/instance=${cluster_name} -n ${namespace} && -kubectl delete pod -l app.kubernetes.io/component=tikv,app.kubernetes.io/instance=${cluster_name} -n ${namespace} -``` +至此服务恢复。 ## 场景 2:所有 PD 节点都故障且无法恢复 @@ -373,3 +366,5 @@ kubectl patch tc ${cluster_name} -n ${namespace} --type merge -p '{"spec":{"pd": kubectl delete pod -l app.kubernetes.io/component=tidb,app.kubernetes.io/instance=${cluster_name} -n ${namespace} && kubectl delete pod -l app.kubernetes.io/component=tikv,app.kubernetes.io/instance=${cluster_name} -n ${namespace} ``` + +至此服务恢复。 From 3a2fd6a3b43b32ea634b1caade403675f3fec5d9 Mon Sep 17 00:00:00 2001 From: Ran Date: Tue, 26 Dec 2023 16:07:05 +0800 Subject: [PATCH 2/2] Apply suggestions from code review --- en/pd-recover.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/en/pd-recover.md b/en/pd-recover.md index c42bfee90..496b0725b 100644 --- a/en/pd-recover.md +++ b/en/pd-recover.md @@ -202,7 +202,7 @@ Check configuration. The following command uses placement rules as an example: kubectl -n ${namespace} exec -it ${cluster_name}-pd-0 -- ./pd-ctl config placement-rules show ``` -Now TiDB cluster is recovered. +Now the TiDB cluster is recovered. ## Scenarios 2: All PD nodes are down and cannot be recovered @@ -365,4 +365,4 @@ kubectl delete pod -l app.kubernetes.io/component=tidb,app.kubernetes.io/instanc kubectl delete pod -l app.kubernetes.io/component=tikv,app.kubernetes.io/instance=${cluster_name} -n ${namespace} ``` -Now TiDB cluster is recovered. +Now the TiDB cluster is recovered.