From decc1af6c3423f2fcc92fa8064b3e34e21cd54cd Mon Sep 17 00:00:00 2001 From: guo-shaoge Date: Wed, 2 Apr 2025 17:28:14 +0800 Subject: [PATCH 01/13] 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 02/13] 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 03/13] 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 04/13] 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 05/13] 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 06/13] 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 07/13] 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 08/13] 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` From 35b0af578030632f4333960ed6f6fc35ce8e22e3 Mon Sep 17 00:00:00 2001 From: Aolin Date: Thu, 10 Jul 2025 18:59:13 +0800 Subject: [PATCH 09/13] Apply suggestions from code review --- tiflash/tiflash-configuration.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tiflash/tiflash-configuration.md b/tiflash/tiflash-configuration.md index 474df451eb53..60ba0bd61710 100644 --- a/tiflash/tiflash-configuration.md +++ b/tiflash/tiflash-configuration.md @@ -138,17 +138,18 @@ summary: TiFlash 配置参数包括 PD 调度参数和 TiFlash 配置参数。PD ##### `dir` -- 用于存储查询落盘文件。 -- 默认使用 [`storage.latest.dir`](#dir-1) 的第一个目录\] + "/tmp" +- 指定用于存储查询的临时落盘文件路径。 +- 默认使用 \[[`storage.latest.dir`](#dir-1) 的第一个目录\] + "/tmp" ##### `capacity` -- 用于限制临时文件目录所能使用的总空间。如果查询落盘过程中落盘文件超过该值,则会报错结束。 -- 单位:Byte。目前不支持如 `"10GB"` 的设置。范围:[0, 9223372036854775807]。 -- 如果不设置该值或者将该值设置为 0,表示不限制临时文件所占用的空间,落盘文件可以使用整个硬盘容量。 -- 如果该值大于 0,TiFlash 启动时会做如下检查: +- 限制临时文件目录的总空间使用量。如果查询过程中生成的临时落盘文件超过该限制,将导致查询报错。 +- 单位: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` 的子目录,也会做类似的检查)。 + - 如果 `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 c613cf45f27396c6b540b0ff0d1f59bec55a80a3 Mon Sep 17 00:00:00 2001 From: Aolin Date: Thu, 10 Jul 2025 18:59:20 +0800 Subject: [PATCH 10/13] Apply suggestions from code review --- tiflash/tiflash-configuration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tiflash/tiflash-configuration.md b/tiflash/tiflash-configuration.md index 60ba0bd61710..42a67d2384f1 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.temp`](#storage.temp-从-v900-版本开始引入)下的配置项代替,因为新的配置项支持设置 capacity 限制临时文件使用的空间。 -- 当 `storage.temp` 配置存在时,会忽略 `tmp_path`。 +- 从 v9.0.0 开始,不推荐使用 `tmp_path`。建议使用 [`storage.temp`](#storage.temp-从-v900-版本开始引入) 中的配置项替代,因其支持设置容量限制,控制临时文件的空间使用。 +- 当 `storage.temp` 配置存在时,`tmp_path` 配置会被忽略。 From 42bd07bf070f9c7eaa42e3ada64bd1cfeabd48d5 Mon Sep 17 00:00:00 2001 From: Aolin Date: Fri, 18 Jul 2025 11:10:38 +0800 Subject: [PATCH 11/13] make ci happy --- 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 42a67d2384f1..db0dec0c0a74 100644 --- a/tiflash/tiflash-configuration.md +++ b/tiflash/tiflash-configuration.md @@ -83,7 +83,7 @@ summary: TiFlash 配置参数包括 PD 调度参数和 TiFlash 配置参数。PD - TiFlash 临时文件的存放路径。 - 默认使用 \[[`path`](#path) 或者 [`storage.latest.dir`](#dir-1) 的第一个目录\] + "/tmp" -- 从 v9.0.0 开始,不推荐使用 `tmp_path`。建议使用 [`storage.temp`](#storage.temp-从-v900-版本开始引入) 中的配置项替代,因其支持设置容量限制,控制临时文件的空间使用。 +- 从 v9.0.0 开始,不推荐使用 `tmp_path`。建议使用 [`storage.temp`](#storagetemp-从-v900-版本开始引入) 中的配置项替代,因其支持设置容量限制,控制临时文件的空间使用。 - 当 `storage.temp` 配置存在时,`tmp_path` 配置会被忽略。 From 6e8202560c01fac84333d271758b9d91ba14fed8 Mon Sep 17 00:00:00 2001 From: Aolin Date: Fri, 18 Jul 2025 15:44:14 +0800 Subject: [PATCH 12/13] Apply suggestions from code review Co-authored-by: Grace Cai --- tiflash/tiflash-configuration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tiflash/tiflash-configuration.md b/tiflash/tiflash-configuration.md index db0dec0c0a74..8d1bcf4c338d 100644 --- a/tiflash/tiflash-configuration.md +++ b/tiflash/tiflash-configuration.md @@ -143,11 +143,11 @@ summary: TiFlash 配置参数包括 PD 调度参数和 TiFlash 配置参数。PD ##### `capacity` -- 限制临时文件目录的总空间使用量。如果查询过程中生成的临时落盘文件超过该限制,将导致查询报错。 +- 限制临时文件目录的总空间使用量。如果查询过程中生成的临时落盘文件大小超过该限制,将导致查询报错。 - 单位:Byte。目前不支持类似 `"10GB"` 的格式。 - 范围:`[0, 9223372036854775807]` - 如果未设置该值或将其设置为 `0`,表示不限制临时文件的空间使用,落盘文件可以使用整个硬盘的容量。 -- 如果设置了大于 `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` 的子目录,也会进行类似检查。 - 该配置项不支持热加载,修改后需要重启 TiFlash 进程才能生效。 From b07d788ba0d16b290cb2282d5221278806697867 Mon Sep 17 00:00:00 2001 From: Aolin Date: Tue, 30 Sep 2025 10:12:26 +0800 Subject: [PATCH 13/13] Apply suggestions from code review Co-authored-by: Grace Cai --- 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 8d1bcf4c338d..a21f30265dfb 100644 --- a/tiflash/tiflash-configuration.md +++ b/tiflash/tiflash-configuration.md @@ -138,7 +138,7 @@ summary: TiFlash 配置参数包括 PD 调度参数和 TiFlash 配置参数。PD ##### `dir` -- 指定用于存储查询的临时落盘文件路径。 +- 指定查询执行过程中临时落盘文件的存储路径。 - 默认使用 \[[`storage.latest.dir`](#dir-1) 的第一个目录\] + "/tmp" ##### `capacity`