Skip to content

add tiflash config storage.temp #20151

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

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
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
20 changes: 20 additions & 0 deletions tiflash/tiflash-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ summary: TiFlash 配置参数包括 PD 调度参数和 TiFlash 配置参数。PD

- TiFlash 临时文件的存放路径。
- 默认使用 \[[`path`](#path) 或者 [`storage.latest.dir`](#dir-1) 的第一个目录\] + "/tmp"
- 从 v9.0.0 开始,不推荐使用 `tmp_path`。建议使用 [`storage.temp`](#storagetemp-从-v900-版本开始引入) 中的配置项替代,因其支持设置容量限制,控制临时文件的空间使用。
- 当 `storage.temp` 配置存在时,`tmp_path` 配置会被忽略。

<!-- 示例值:`"/tidb-data/tiflash-9000/tmp"` -->

Expand Down Expand Up @@ -132,6 +134,24 @@ summary: TiFlash 配置参数包括 PD 调度参数和 TiFlash 配置参数。PD

<!-- 示例值:`[10737418240, 10737418240]` -->

#### storage.temp <span class="version-mark">从 v9.0.0 版本开始引入</span>

##### `dir`

- 指定用于存储查询的临时落盘文件路径。
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- 指定用于存储查询的临时落盘文件路径
- 指定查询执行过程中临时落盘文件的存储路径

- 默认使用 \[[`storage.latest.dir`](#dir-1) 的第一个目录\] + "/tmp"

##### `capacity`

- 限制临时文件目录的总空间使用量。如果查询过程中生成的临时落盘文件大小超过该限制,将导致查询报错。
- 单位:Byte。目前不支持类似 `"10GB"` 的格式。
- 范围:`[0, 9223372036854775807]`
- 如果未设置该值或将其设置为 `0`,表示不限制临时文件的空间使用,落盘文件可以使用整个硬盘的容量。
- 如果设置为大于 `0` 的值,TiFlash 在启动时会执行以下检查:
- `storage.temp.capacity` 必须小于等于 `storage.temp.dir` 所在硬盘的总空间。
- 如果 `storage.temp.dir` 是 `storage.main.dir` 的子目录,且 `storage.main.capacity` 大于 `0`,则 `storage.temp.capacity` 必须小于等于 `storage.main.capacity`。同理,如果是 `storage.latest.dir` 的子目录,也会进行类似检查。
- 该配置项不支持热加载,修改后需要重启 TiFlash 进程才能生效。

#### storage.io_rate_limit <span class="version-mark">从 v5.2.0 版本开始引入</span>

I/O 限流功能相关配置。
Expand Down