From edb8e048bdacf97ea3261d582d35f4f4046acb07 Mon Sep 17 00:00:00 2001 From: TomShawn <1135243111@qq.com> Date: Wed, 15 Apr 2020 19:23:11 +0800 Subject: [PATCH 1/3] reference: add a new config in tidb-server config doc --- reference/configuration/tidb-server/configuration-file.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/reference/configuration/tidb-server/configuration-file.md b/reference/configuration/tidb-server/configuration-file.md index efaaf11779b4d..ef542ee0553c2 100644 --- a/reference/configuration/tidb-server/configuration-file.md +++ b/reference/configuration/tidb-server/configuration-file.md @@ -34,6 +34,14 @@ The TiDB configuration file supports more options than command-line parameters. + Default value: `/tidb/tmp-storage` + It only takes effect when `oom-use-tmp-storage` is `true`. +### `temp-storage-quota` + ++ Specifies the storage quota for the storage in `tmp-storage-path`. ++ When a single SQL statement uses a temporary disk and the total volume of the temporary disk of the TiDB server exceeds this configuration value, the current SQL operation is cancelled and the `Out of Global Storage Quota!` error is returned. ++ When the value of this configuration is smaller than `0`, the above check and limit do not apply. ++ Default value: `-1` ++ When the remaining available storage in `tmp-storage-path` is lower than the value defined by `temp-storage-quota`, the TiDB server reports an error when it is started and exits. + ### `oom-action` - Specifies what operation TiDB performs when a single SQL statement exceeds the memory quota specified by `mem-quota-query` and cannot be spilled over to disk. From 4e07a1c77d590cf8400ec52629863a84b774c7bb Mon Sep 17 00:00:00 2001 From: TomShawn <1135243111@qq.com> Date: Thu, 16 Apr 2020 15:13:19 +0800 Subject: [PATCH 2/3] address comments --- reference/configuration/tidb-server/configuration-file.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/configuration/tidb-server/configuration-file.md b/reference/configuration/tidb-server/configuration-file.md index ef542ee0553c2..c74c0e5f76244 100644 --- a/reference/configuration/tidb-server/configuration-file.md +++ b/reference/configuration/tidb-server/configuration-file.md @@ -36,11 +36,11 @@ The TiDB configuration file supports more options than command-line parameters. ### `temp-storage-quota` -+ Specifies the storage quota for the storage in `tmp-storage-path`. ++ Specifies the quota for the storage in `tmp-storage-path`. The unit is byte. + When a single SQL statement uses a temporary disk and the total volume of the temporary disk of the TiDB server exceeds this configuration value, the current SQL operation is cancelled and the `Out of Global Storage Quota!` error is returned. + When the value of this configuration is smaller than `0`, the above check and limit do not apply. + Default value: `-1` -+ When the remaining available storage in `tmp-storage-path` is lower than the value defined by `temp-storage-quota`, the TiDB server reports an error when it is started and exits. ++ When the remaining available storage in `tmp-storage-path` is lower than the value defined by `temp-storage-quota`, the TiDB server reports an error when it is started, and exits. ### `oom-action` From aa2ac159429a0af633851d335ebdbabe212e045f Mon Sep 17 00:00:00 2001 From: TomShawn <1135243111@qq.com> Date: Thu, 16 Apr 2020 21:15:24 +0800 Subject: [PATCH 3/3] align #2771 --- reference/configuration/tidb-server/configuration-file.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/configuration/tidb-server/configuration-file.md b/reference/configuration/tidb-server/configuration-file.md index c74c0e5f76244..8e13e0fe45f75 100644 --- a/reference/configuration/tidb-server/configuration-file.md +++ b/reference/configuration/tidb-server/configuration-file.md @@ -34,13 +34,13 @@ The TiDB configuration file supports more options than command-line parameters. + Default value: `/tidb/tmp-storage` + It only takes effect when `oom-use-tmp-storage` is `true`. -### `temp-storage-quota` +### `tmp-storage-quota` + Specifies the quota for the storage in `tmp-storage-path`. The unit is byte. + When a single SQL statement uses a temporary disk and the total volume of the temporary disk of the TiDB server exceeds this configuration value, the current SQL operation is cancelled and the `Out of Global Storage Quota!` error is returned. + When the value of this configuration is smaller than `0`, the above check and limit do not apply. + Default value: `-1` -+ When the remaining available storage in `tmp-storage-path` is lower than the value defined by `temp-storage-quota`, the TiDB server reports an error when it is started, and exits. ++ When the remaining available storage in `tmp-storage-path` is lower than the value defined by `tmp-storage-quota`, the TiDB server reports an error when it is started, and exits. ### `oom-action`