From c7fd01b89686b68c195dbb27b6e2a2a2cf27c5cd Mon Sep 17 00:00:00 2001 From: Aolin Date: Thu, 10 Jul 2025 19:18:31 +0800 Subject: [PATCH 1/3] add tiflash config storage.temp --- tiflash/tiflash-configuration.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tiflash/tiflash-configuration.md b/tiflash/tiflash-configuration.md index 0ba3b83c37c67..9148406efcf34 100644 --- a/tiflash/tiflash-configuration.md +++ b/tiflash/tiflash-configuration.md @@ -87,6 +87,8 @@ This section introduces the configuration parameters of TiFlash. - The path in which the TiFlash temporary files are stored. - By default, it is the first directory in [`path`](#path) or in [`storage.latest.dir`](#dir-1) appended with `"/tmp"`. +- Starting from v9.0.0, using `tmp_path` is not recommended. It is recommended to use the [`storage.temp`](#storage.temp-new-in-v900) configuration instead, which supports capacity limits to control temporary file space usage. +- When the `storage.temp` configuration exists, the `tmp_path` configuration is ignored. @@ -136,6 +138,24 @@ Configure storage path related settings. +#### storage.temp New in v9.0.0 + +##### `dir` + +- The path in which the temporary spill files generated during queries are stored. +- By default, it is the first directory in [`storage.latest.dir`](#dir-1) appended with `"/tmp"`. + +##### `capacity` + +- Limits the total space usage of the temporary file directory. If the temporary spill files generated during query execution exceed this limit, the query fails with an error. +- Unit: Byte. Formats such as `"10GB"` are not supported. +- Range: `[0, 9223372036854775807]` +- If this value is not set or set to `0`, temporary files are not subject to a space limit and can use the entire disk capacity. +- If a value greater than `0` is set, TiFlash performs the following checks at startup: + - `storage.temp.capacity` must be less than or equal to the total space of the disk where `storage.temp.dir` is located. + - If `storage.temp.dir` is a subdirectory of `storage.main.dir` and `storage.main.capacity` is greater than `0`, then `storage.temp.capacity` must be less than or equal to `storage.main.capacity`. The same check applies if it is a subdirectory of `storage.latest.dir`. +- This configuration item does not support hot-reloading. You must restart the TiFlash process for changes to take effect. + #### storage.io_rate_limit New in v5.2.0 Configure the I/O traffic limit settings. From 556b23a082410e3b4150358cecba43552dbc1867 Mon Sep 17 00:00:00 2001 From: Aolin Date: Fri, 18 Jul 2025 11:11:55 +0800 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- 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 9148406efcf34..b5eedff2741b4 100644 --- a/tiflash/tiflash-configuration.md +++ b/tiflash/tiflash-configuration.md @@ -87,7 +87,7 @@ This section introduces the configuration parameters of TiFlash. - The path in which the TiFlash temporary files are stored. - By default, it is the first directory in [`path`](#path) or in [`storage.latest.dir`](#dir-1) appended with `"/tmp"`. -- Starting from v9.0.0, using `tmp_path` is not recommended. It is recommended to use the [`storage.temp`](#storage.temp-new-in-v900) configuration instead, which supports capacity limits to control temporary file space usage. +- Starting from v9.0.0, it is recommended that you use the [`storage.temp`](#storagetemp-new-in-v900) configuration instead of `tmp_path`, as it supports capacity limits to control temporary file space usage. - When the `storage.temp` configuration exists, the `tmp_path` configuration is ignored. From 6dcd67b57497f86ad6a3d244892a9d8e861c4740 Mon Sep 17 00:00:00 2001 From: Aolin Date: Fri, 18 Jul 2025 16:08:52 +0800 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Grace Cai --- tiflash/tiflash-configuration.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tiflash/tiflash-configuration.md b/tiflash/tiflash-configuration.md index b5eedff2741b4..ee2e6b2cf01c4 100644 --- a/tiflash/tiflash-configuration.md +++ b/tiflash/tiflash-configuration.md @@ -87,8 +87,8 @@ This section introduces the configuration parameters of TiFlash. - The path in which the TiFlash temporary files are stored. - By default, it is the first directory in [`path`](#path) or in [`storage.latest.dir`](#dir-1) appended with `"/tmp"`. -- Starting from v9.0.0, it is recommended that you use the [`storage.temp`](#storagetemp-new-in-v900) configuration instead of `tmp_path`, as it supports capacity limits to control temporary file space usage. -- When the `storage.temp` configuration exists, the `tmp_path` configuration is ignored. +- Starting from v9.0.0, it is recommended that you use the [`storage.temp`](#storagetemp-new-in-v900) configuration instead of `tmp_path`, because it supports setting a capacity limit to control temporary file space usage. +- When `storage.temp` is configured, the `tmp_path` configuration does not take effect. @@ -142,7 +142,7 @@ Configure storage path related settings. ##### `dir` -- The path in which the temporary spill files generated during queries are stored. +- The directory in which the temporary spill files generated during query execution are stored. - By default, it is the first directory in [`storage.latest.dir`](#dir-1) appended with `"/tmp"`. ##### `capacity` @@ -150,7 +150,7 @@ Configure storage path related settings. - Limits the total space usage of the temporary file directory. If the temporary spill files generated during query execution exceed this limit, the query fails with an error. - Unit: Byte. Formats such as `"10GB"` are not supported. - Range: `[0, 9223372036854775807]` -- If this value is not set or set to `0`, temporary files are not subject to a space limit and can use the entire disk capacity. +- If this value is not set or is set to `0`, temporary files are not subject to a space limit and can use the entire disk capacity. - If a value greater than `0` is set, TiFlash performs the following checks at startup: - `storage.temp.capacity` must be less than or equal to the total space of the disk where `storage.temp.dir` is located. - If `storage.temp.dir` is a subdirectory of `storage.main.dir` and `storage.main.capacity` is greater than `0`, then `storage.temp.capacity` must be less than or equal to `storage.main.capacity`. The same check applies if it is a subdirectory of `storage.latest.dir`.