Skip to content

Commit b20120f

Browse files
lidezhuyikekesolotzg
authored
tiflash: add more explanation on how to clear syncing rules about tiflash in pd (#2838)
* Add more explanation about how to clear syncing rules in tiflash * Fix comment * Update reference/tiflash/maintain.md Co-Authored-By: Keke Yi <40977455+yikeke@users.noreply.github.com> * Update reference/tiflash/maintain.md Co-Authored-By: Keke Yi <40977455+yikeke@users.noreply.github.com> * Update reference/tiflash/maintain.md Co-Authored-By: Keke Yi <40977455+yikeke@users.noreply.github.com> * remove weird codes Co-authored-by: Keke Yi <40977455+yikeke@users.noreply.github.com> Co-authored-by: Tong Zhigao <solotzg@163.com>
1 parent 45ae6f4 commit b20120f

File tree

1 file changed

+41
-2
lines changed

1 file changed

+41
-2
lines changed

reference/tiflash/maintain.md

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,47 @@ category: reference
5858
> **注意:**
5959
>
6060
> 如果在集群中所有的 TiFlash 节点停止运行之前,没有取消所有同步到 TiFlash 的表,则需要手动在 PD 中清除同步规则,否则无法成功完成 TiFlash 节点的下线。
61-
>
62-
> 手动在 PD 中清除同步规则的方法是:发送 DELETE 请求 `http://<pd_ip>:<pd_port>/pd/api/v1/config/rule/tiflash/<rule_id>`,rule_id 是需要清除的 rule 的 id。
61+
62+
手动在 PD 中清除同步规则的步骤如下:
63+
64+
1. 查询当前 PD 实例中所有与 TiFlash 相关的的数据同步规则。
65+
66+
{{< copyable "shell-regular" >}}
67+
68+
```shell
69+
curl http://<pd_ip>:<pd_port>/pd/api/v1/config/rules/group/tiflash
70+
```
71+
72+
```
73+
[
74+
{
75+
"group_id": "tiflash",
76+
"id": "table-45-r",
77+
"override": true,
78+
"start_key": "7480000000000000FF2D5F720000000000FA",
79+
"end_key": "7480000000000000FF2E00000000000000F8",
80+
"role": "learner",
81+
"count": 1,
82+
"label_constraints": [
83+
{
84+
"key": "engine",
85+
"op": "in",
86+
"values": [
87+
"tiflash"
88+
]
89+
}
90+
]
91+
}
92+
]
93+
```
94+
95+
2. 删除所有与 TiFlash 相关的数据同步规则。以 `id``table-45-r` 的规则为例,通过以下命令可以删除该规则。
96+
97+
{{< copyable "shell-regular" >}}
98+
99+
```shell
100+
curl -v -X DELETE http://<pd_ip>:<pd_port>/pd/api/v1/config/rule/tiflash/table-45-r
101+
```
63102

64103
## TiFlash 故障处理
65104

0 commit comments

Comments
 (0)