Skip to content

Commit

Permalink
pd-control: add description for `scheduler config evict-leader-schedu…
Browse files Browse the repository at this point in the history
…ler` (#17755) (#17798)
  • Loading branch information
ti-chi-bot authored Jun 27, 2024
1 parent f7f7d4f commit 6ace25d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions pd-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,8 @@ Encoding 格式示例:
>> scheduler add grant-leader-scheduler 1 // 把 store 1 上的所有 Region 的 leader 调度到 store 1
>> scheduler add evict-leader-scheduler 1 // 把 store 1 上的所有 Region 的 leader 从 store 1 调度出去
>> scheduler config evict-leader-scheduler // v4.0.0 起,展示该调度器具体在哪些 store 上
>> scheduler config evict-leader-scheduler add-store 2 // 为 store 2 添加 leader 驱逐调度
>> scheduler config evict-leader-scheduler delete-store 2 // 为 store 2 移除 leader 驱逐调度
>> scheduler add shuffle-leader-scheduler // 随机交换不同 store 上的 leader
>> scheduler add shuffle-region-scheduler // 随机调度不同 store 上的 Region
>> scheduler add evict-slow-store-scheduler // 当有且仅有一个 slow store 时将该 store 上的所有 Region 的 leader 驱逐出去
Expand Down Expand Up @@ -1092,6 +1094,24 @@ Encoding 格式示例:
>> scheduler config balance-hot-region-scheduler set enable-for-tiflash true
```

### `scheduler config evict-leader-scheduler`

用于查看和管理 `evict-leader-scheduler` 的配置。

- 在已有 `evict-leader-scheduler` 时,使用 `add-store` 子命令,为指定的 store 添加 leader 驱逐调度:

```bash
scheduler config evict-leader-scheduler add-store 2 // 为 store 2 添加 leader 驱逐调度
```

- 在已有 `evict-leader-scheduler` 时,使用 `delete-store` 子命令,移除指定 store 的 leader 驱逐调度:

```bash
scheduler config evict-leader-scheduler delete-store 2 // 为 store 2 移除 leader 驱逐调度
```

当一个 `evict-leader-scheduler` 的所有 store 配置都被移除后,该调度器也会自动被移除。

### `store [delete | label | weight | remove-tombstone | limit ] <store_id> [--jq="<query string>"]`

用于显示 store 信息或者删除指定 store。使用 jq 格式化输出请参考 [jq 格式化 json 输出示例](#jq-格式化-json-输出示例)。示例如下。
Expand Down

0 comments on commit 6ace25d

Please sign in to comment.