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 8 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
19 changes: 19 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`](#storage.temp-从-v900-版本开始引入)下的配置项代替,因为新的配置项支持设置 capacity 限制临时文件使用的空间。
- 当 `storage.temp` 配置存在时,会忽略 `tmp_path`。
Comment on lines +86 to +87
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
- 从 v9.0.0 版本开始,不推荐使用 `tmp_path`推荐使用 [`storage.temp`](#storage.temp-从-v900-版本开始引入)下的配置项代替,因为新的配置项支持设置 capacity 限制临时文件使用的空间
-`storage.temp` 配置存在时,会忽略 `tmp_path`
- 从 v9.0.0 开始,不推荐使用 `tmp_path`建议使用 [`storage.temp`](#storage.temp-从-v900-版本开始引入) 中的配置项替代,因其支持设置容量限制,控制临时文件的空间使用
-`storage.temp` 配置存在时,`tmp_path` 配置会被忽略


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

Expand Down Expand Up @@ -132,6 +134,23 @@ 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"
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"
- 默认使用 \[[`storage.latest.dir`](#dir-1) 的第一个目录\] + "/tmp"


##### `capacity`

- 用于限制临时文件目录所能使用的总空间。如果查询落盘过程中落盘文件超过该值,则会报错结束。
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
- 用于限制临时文件目录所能使用的总空间。如果查询落盘过程中落盘文件超过该值,则会报错结束
- 限制临时文件目录的总空间使用量。如果查询过程中生成的落盘文件超过该限制,将导致错误并中止操作

- 单位:Byte。目前不支持如 `"10GB"` 的设置。范围:[0, 9223372036854775807]。
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
- 单位:Byte。目前不支持如 `"10GB"` 的设置。范围:[0, 9223372036854775807]
- 单位:Byte。目前不支持类似 `"10GB"` 的格式
- 范围:`[0, 9223372036854775807]`

- 如果不设置该值或者将该值设置为 0,表示不限制临时文件所占用的空间,落盘文件可以使用整个硬盘容量。
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
- 如果不设置该值或者将该值设置为 0,表示不限制临时文件所占用的空间,落盘文件可以使用整个硬盘容量
- 如果未设置该值或将其设置为 `0`,表示不限制临时文件的空间使用,落盘文件可以使用整个硬盘的容量

- 如果该值大于 0,TiFlash 启动时会做如下检查:
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
- 如果该值大于 0,TiFlash 启动时会做如下检查
- 如果设置了大于 `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` 的子目录,也会做类似的检查)。
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.temp.dir` 是 `storage.main.dir` 的子目录,且 `storage.main.capacity` 大于 0,则 `storage.temp.capacity` 必须小于等于 `storage.main.capacity`。(同理如果是 `storage.latest.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
Loading