From decc1af6c3423f2fcc92fa8064b3e34e21cd54cd Mon Sep 17 00:00:00 2001 From: guo-shaoge Date: Wed, 2 Apr 2025 17:28:14 +0800 Subject: [PATCH 1/8] add tiflash config max_spilled_bytes Signed-off-by: guo-shaoge --- tiflash/tiflash-configuration.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tiflash/tiflash-configuration.md b/tiflash/tiflash-configuration.md index 42ad422479ed..a68aad172223 100644 --- a/tiflash/tiflash-configuration.md +++ b/tiflash/tiflash-configuration.md @@ -475,6 +475,13 @@ I/O 限流功能相关配置。 - 默认值:`false` - 可选值:`true`、`false` +##### `max_spilled_bytes` 从 v9.1.0 版本开始引入 + +- 表示算子落盘文件可以使用的文件大小,如果算子落盘过程中,发现总的落盘文件超过该值,则该查询会报错。 +- 默认值: `0`,表示落盘文件大小无限制。 +- 类型:uint64 +- 可选范围:[0, 18446744073709551615] + #### security 从 v4.0.5 版本开始引入 安全相关配置。 From a3d5172a7c5eb7b181da631fafadefdd7439bfaa Mon Sep 17 00:00:00 2001 From: guo-shaoge Date: Wed, 2 Apr 2025 17:32:31 +0800 Subject: [PATCH 2/8] fix Signed-off-by: guo-shaoge --- tiflash/tiflash-configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiflash/tiflash-configuration.md b/tiflash/tiflash-configuration.md index a68aad172223..3e7d781d1fe6 100644 --- a/tiflash/tiflash-configuration.md +++ b/tiflash/tiflash-configuration.md @@ -477,7 +477,7 @@ I/O 限流功能相关配置。 ##### `max_spilled_bytes` 从 v9.1.0 版本开始引入 -- 表示算子落盘文件可以使用的文件大小,如果算子落盘过程中,发现总的落盘文件超过该值,则该查询会报错。 +- 表示算子落盘文件可以使用的硬盘大小。如果算子落盘过程中,硬盘用量超过该值,则对应查询会报错。 - 默认值: `0`,表示落盘文件大小无限制。 - 类型:uint64 - 可选范围:[0, 18446744073709551615] From 5cf8510d16ea1a5c0aa9b0343ba97615f9f69deb Mon Sep 17 00:00:00 2001 From: guo-shaoge Date: Wed, 2 Apr 2025 17:38:14 +0800 Subject: [PATCH 3/8] fix Signed-off-by: guo-shaoge --- tiflash/tiflash-configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiflash/tiflash-configuration.md b/tiflash/tiflash-configuration.md index 3e7d781d1fe6..1a2231a1e6e2 100644 --- a/tiflash/tiflash-configuration.md +++ b/tiflash/tiflash-configuration.md @@ -475,7 +475,7 @@ I/O 限流功能相关配置。 - 默认值:`false` - 可选值:`true`、`false` -##### `max_spilled_bytes` 从 v9.1.0 版本开始引入 +##### `max_spilled_bytes` 从 v9.0.0 版本开始引入 - 表示算子落盘文件可以使用的硬盘大小。如果算子落盘过程中,硬盘用量超过该值,则对应查询会报错。 - 默认值: `0`,表示落盘文件大小无限制。 From 14d34101037aa8f562b41d4d5ae8b16de8e142b9 Mon Sep 17 00:00:00 2001 From: guo-shaoge Date: Tue, 15 Apr 2025 14:34:07 +0800 Subject: [PATCH 4/8] fix Signed-off-by: guo-shaoge --- tiflash/tiflash-configuration.md | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/tiflash/tiflash-configuration.md b/tiflash/tiflash-configuration.md index 1a2231a1e6e2..d8abeec80ac1 100644 --- a/tiflash/tiflash-configuration.md +++ b/tiflash/tiflash-configuration.md @@ -83,6 +83,8 @@ summary: TiFlash 配置参数包括 PD 调度参数和 TiFlash 配置参数。PD - TiFlash 临时文件的存放路径。 - 默认使用 \[[`path`](#path) 或者 [`storage.latest.dir`](#dir-1) 的第一个目录\] + "/tmp" +- 从 v9.0.0 版本开始,不推荐使用 `tmp_path`。推荐使用 [`storage.tmp`](#storage.tmp-从-v900-版本开始引入)下的配置项代替,因为新的配置项支持设置 capacity 限制临时文件使用的空间。 +- 当 `storage.tmp` 配置存在时,会忽略 `tmp_path`。 @@ -132,6 +134,23 @@ summary: TiFlash 配置参数包括 PD 调度参数和 TiFlash 配置参数。PD +#### storage.tmp 从 v9.0.0 版本开始引入 + +##### `dir` + +- 用于存储查询落盘文件。 +- 默认情况可以不设置该值,默认使用 [`storage.latest.dir`](#dir) 。 + +##### `capacity` + +- 用于限制临时文件目录所能使用的总空间。如果查询落盘过程中落盘文件超过该值,则会报错结束。 +- 单位:Byte。目前不支持如 `"10GB"` 的设置。范围:[0, 9223372036854775807]。 +- 如果不设置该值或者将该值设置为 0,表示不限制临时文件所占用的空间,落盘文件可以使用整个硬盘容量。 +- 如果该值大于 0,TiFlash 启动时会做如下检查: + - `storage.tmp.capacity` 必须小于等于 `storage.tmp.dir` 所在硬盘的总空间。 + - 例如 `storage.tmp.dir` 是 `storage.main.dir` 的子目录,且 `storage.main.capacity` 大于 0,则 TiFlash 启动时会检查 `storage.tmp.capacity` 必须小于等于 `storage.main.capacity`。(同理位于 `storage.latest.dir`也会做类似的检查)。 +- 该配置项不支持热加载,修改后需要重启 TiFlash 进程才能生效。 + #### storage.io_rate_limit 从 v5.2.0 版本开始引入 I/O 限流功能相关配置。 @@ -475,13 +494,6 @@ I/O 限流功能相关配置。 - 默认值:`false` - 可选值:`true`、`false` -##### `max_spilled_bytes` 从 v9.0.0 版本开始引入 - -- 表示算子落盘文件可以使用的硬盘大小。如果算子落盘过程中,硬盘用量超过该值,则对应查询会报错。 -- 默认值: `0`,表示落盘文件大小无限制。 -- 类型:uint64 -- 可选范围:[0, 18446744073709551615] - #### security 从 v4.0.5 版本开始引入 安全相关配置。 From ff9a5baccdb645eef44b0b8a5dd526ef6c91fad7 Mon Sep 17 00:00:00 2001 From: guo-shaoge Date: Tue, 15 Apr 2025 16:57:38 +0800 Subject: [PATCH 5/8] fix temp Signed-off-by: guo-shaoge --- tiflash/tiflash-configuration.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tiflash/tiflash-configuration.md b/tiflash/tiflash-configuration.md index d8abeec80ac1..f11d65f83d9c 100644 --- a/tiflash/tiflash-configuration.md +++ b/tiflash/tiflash-configuration.md @@ -83,8 +83,8 @@ summary: TiFlash 配置参数包括 PD 调度参数和 TiFlash 配置参数。PD - TiFlash 临时文件的存放路径。 - 默认使用 \[[`path`](#path) 或者 [`storage.latest.dir`](#dir-1) 的第一个目录\] + "/tmp" -- 从 v9.0.0 版本开始,不推荐使用 `tmp_path`。推荐使用 [`storage.tmp`](#storage.tmp-从-v900-版本开始引入)下的配置项代替,因为新的配置项支持设置 capacity 限制临时文件使用的空间。 -- 当 `storage.tmp` 配置存在时,会忽略 `tmp_path`。 +- 从 v9.0.0 版本开始,不推荐使用 `tmp_path`。推荐使用 [`storage.temp`](#storage.temp-从-v900-版本开始引入)下的配置项代替,因为新的配置项支持设置 capacity 限制临时文件使用的空间。 +- 当 `storage.temp` 配置存在时,会忽略 `tmp_path`。 @@ -134,12 +134,12 @@ summary: TiFlash 配置参数包括 PD 调度参数和 TiFlash 配置参数。PD -#### storage.tmp 从 v9.0.0 版本开始引入 +#### storage.temp 从 v9.0.0 版本开始引入 ##### `dir` - 用于存储查询落盘文件。 -- 默认情况可以不设置该值,默认使用 [`storage.latest.dir`](#dir) 。 +- 默认使用 \[[`path`](#path) 或者 [`storage.latest.dir`](#dir-1) 的第一个目录\] + "/tmp" ##### `capacity` @@ -147,8 +147,8 @@ summary: TiFlash 配置参数包括 PD 调度参数和 TiFlash 配置参数。PD - 单位:Byte。目前不支持如 `"10GB"` 的设置。范围:[0, 9223372036854775807]。 - 如果不设置该值或者将该值设置为 0,表示不限制临时文件所占用的空间,落盘文件可以使用整个硬盘容量。 - 如果该值大于 0,TiFlash 启动时会做如下检查: - - `storage.tmp.capacity` 必须小于等于 `storage.tmp.dir` 所在硬盘的总空间。 - - 例如 `storage.tmp.dir` 是 `storage.main.dir` 的子目录,且 `storage.main.capacity` 大于 0,则 TiFlash 启动时会检查 `storage.tmp.capacity` 必须小于等于 `storage.main.capacity`。(同理位于 `storage.latest.dir`也会做类似的检查)。 + - `storage.temp.capacity` 必须小于等于 `storage.temp.dir` 所在硬盘的总空间。 + - 例如 `storage.temp.dir` 是 `storage.main.dir` 的子目录,且 `storage.main.capacity` 大于 0,则 TiFlash 启动时会检查 `storage.temp.capacity` 必须小于等于 `storage.main.capacity`。(同理位于 `storage.latest.dir`也会做类似的检查)。 - 该配置项不支持热加载,修改后需要重启 TiFlash 进程才能生效。 #### storage.io_rate_limit 从 v5.2.0 版本开始引入 From 954467b24bf6120e00087d66f8638008d6acf4cb Mon Sep 17 00:00:00 2001 From: guo-shaoge Date: Tue, 15 Apr 2025 16:59:10 +0800 Subject: [PATCH 6/8] fix Signed-off-by: guo-shaoge --- tiflash/tiflash-configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiflash/tiflash-configuration.md b/tiflash/tiflash-configuration.md index f11d65f83d9c..13d7d938a0bd 100644 --- a/tiflash/tiflash-configuration.md +++ b/tiflash/tiflash-configuration.md @@ -148,7 +148,7 @@ summary: TiFlash 配置参数包括 PD 调度参数和 TiFlash 配置参数。PD - 如果不设置该值或者将该值设置为 0,表示不限制临时文件所占用的空间,落盘文件可以使用整个硬盘容量。 - 如果该值大于 0,TiFlash 启动时会做如下检查: - `storage.temp.capacity` 必须小于等于 `storage.temp.dir` 所在硬盘的总空间。 - - 例如 `storage.temp.dir` 是 `storage.main.dir` 的子目录,且 `storage.main.capacity` 大于 0,则 TiFlash 启动时会检查 `storage.temp.capacity` 必须小于等于 `storage.main.capacity`。(同理位于 `storage.latest.dir`也会做类似的检查)。 + - 如果 `storage.temp.dir` 是 `storage.main.dir` 的子目录,且 `storage.main.capacity` 大于 0,则 TiFlash 启动时会检查 `storage.temp.capacity` 必须小于等于 `storage.main.capacity`。(同理位于 `storage.latest.dir`也会做类似的检查)。 - 该配置项不支持热加载,修改后需要重启 TiFlash 进程才能生效。 #### storage.io_rate_limit 从 v5.2.0 版本开始引入 From 803f67fac0e8648b4e540de1a1b981beb95eb358 Mon Sep 17 00:00:00 2001 From: guo-shaoge Date: Tue, 15 Apr 2025 17:00:01 +0800 Subject: [PATCH 7/8] fix Signed-off-by: guo-shaoge --- tiflash/tiflash-configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiflash/tiflash-configuration.md b/tiflash/tiflash-configuration.md index 13d7d938a0bd..00302f133fef 100644 --- a/tiflash/tiflash-configuration.md +++ b/tiflash/tiflash-configuration.md @@ -148,7 +148,7 @@ summary: TiFlash 配置参数包括 PD 调度参数和 TiFlash 配置参数。PD - 如果不设置该值或者将该值设置为 0,表示不限制临时文件所占用的空间,落盘文件可以使用整个硬盘容量。 - 如果该值大于 0,TiFlash 启动时会做如下检查: - `storage.temp.capacity` 必须小于等于 `storage.temp.dir` 所在硬盘的总空间。 - - 如果 `storage.temp.dir` 是 `storage.main.dir` 的子目录,且 `storage.main.capacity` 大于 0,则 TiFlash 启动时会检查 `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 从 v5.2.0 版本开始引入 From b96f6fd2a5c3b54fec21c2f7f6eacff0356fe0d2 Mon Sep 17 00:00:00 2001 From: JaySon Date: Sat, 26 Apr 2025 17:29:20 +0800 Subject: [PATCH 8/8] Apply suggestions from code review Co-authored-by: guo-shaoge --- tiflash/tiflash-configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiflash/tiflash-configuration.md b/tiflash/tiflash-configuration.md index 00302f133fef..474df451eb53 100644 --- a/tiflash/tiflash-configuration.md +++ b/tiflash/tiflash-configuration.md @@ -139,7 +139,7 @@ summary: TiFlash 配置参数包括 PD 调度参数和 TiFlash 配置参数。PD ##### `dir` - 用于存储查询落盘文件。 -- 默认使用 \[[`path`](#path) 或者 [`storage.latest.dir`](#dir-1) 的第一个目录\] + "/tmp" +- 默认使用 [`storage.latest.dir`](#dir-1) 的第一个目录\] + "/tmp" ##### `capacity`