Skip to content
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

tiflash: add more explanation on how to clear syncing rules about tiflash in pd #2838

Merged
merged 7 commits into from
Apr 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 41 additions & 2 deletions reference/tiflash/maintain.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,47 @@ category: reference
> **注意:**
>
> 如果在集群中所有的 TiFlash 节点停止运行之前,没有取消所有同步到 TiFlash 的表,则需要手动在 PD 中清除同步规则,否则无法成功完成 TiFlash 节点的下线。
>
> 手动在 PD 中清除同步规则的方法是:发送 DELETE 请求 `http://<pd_ip>:<pd_port>/pd/api/v1/config/rule/tiflash/<rule_id>`,rule_id 是需要清除的 rule 的 id。

手动在 PD 中清除同步规则的步骤如下:

1. 查询当前 PD 实例中所有与 TiFlash 相关的的数据同步规则。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. 查询当前 PD 实例中所有与 TiFlash 相关的的数据同步规则
1. 查询当前 PD 实例中所有与 TiFlash 相关的数据同步规则

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you open a PR to fix this typo? @lidezhu


{{< copyable "shell-regular" >}}

```shell
curl http://<pd_ip>:<pd_port>/pd/api/v1/config/rules/group/tiflash
```

```
[
{
"group_id": "tiflash",
"id": "table-45-r",
"override": true,
"start_key": "7480000000000000FF2D5F720000000000FA",
"end_key": "7480000000000000FF2E00000000000000F8",
"role": "learner",
"count": 1,
"label_constraints": [
{
"key": "engine",
"op": "in",
"values": [
"tiflash"
]
}
]
}
]
```

2. 删除所有与 TiFlash 相关的数据同步规则。以 `id` 为 `table-45-r` 的规则为例,通过以下命令可以删除该规则。

{{< copyable "shell-regular" >}}

```shell
curl -v -X DELETE http://<pd_ip>:<pd_port>/pd/api/v1/config/rule/tiflash/table-45-r
```

## TiFlash 故障处理

Expand Down