Skip to content

Commit f4a584d

Browse files
authored
add tiflash config storage.temp (#21376)
1 parent 3a728a1 commit f4a584d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tiflash/tiflash-configuration.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ This section introduces the configuration parameters of TiFlash.
6565

6666
- The path in which the TiFlash temporary files are stored.
6767
- By default, it is the first directory in [`path`](#path) or in [`storage.latest.dir`](#dir-1) appended with `"/tmp"`.
68+
- 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.
69+
- When `storage.temp` is configured, the `tmp_path` configuration does not take effect.
6870

6971
<!-- Example: `"/tidb-data/tiflash-9000/tmp"` -->
7072

@@ -122,6 +124,24 @@ Configure storage path related settings.
122124

123125
<!-- Example: `[10737418240, 10737418240]` -->
124126

127+
#### storage.temp <span class="version-mark">New in v9.0.0</span>
128+
129+
##### `dir`
130+
131+
- The directory in which the temporary spill files generated during query execution are stored.
132+
- By default, it is the first directory in [`storage.latest.dir`](#dir-1) appended with `"/tmp"`.
133+
134+
##### `capacity`
135+
136+
- 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.
137+
- Unit: Byte. Formats such as `"10GB"` are not supported.
138+
- Range: `[0, 9223372036854775807]`
139+
- 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.
140+
- If a value greater than `0` is set, TiFlash performs the following checks at startup:
141+
- `storage.temp.capacity` must be less than or equal to the total space of the disk where `storage.temp.dir` is located.
142+
- 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`.
143+
- This configuration item does not support hot-reloading. You must restart the TiFlash process for changes to take effect.
144+
125145
#### storage.io_rate_limit <span class="version-mark">New in v5.2.0</span>
126146

127147
Configure the I/O traffic limit settings.

0 commit comments

Comments
 (0)