From 7e5928a094186bafcee0f764e0914cf652a632d1 Mon Sep 17 00:00:00 2001 From: tiancaiamao Date: Thu, 26 Sep 2024 11:00:33 +0800 Subject: [PATCH 1/5] sys-variables: update @@tidb_schema_cache_size default value --- system-variables.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/system-variables.md b/system-variables.md index d711456de897..32e44e940e72 100644 --- a/system-variables.md +++ b/system-variables.md @@ -5163,15 +5163,17 @@ SHOW WARNINGS; > **Warning:** > -> The feature controlled by this variable is not yet effective in the current TiDB version. Do not change the default value. +> The feature controlled by this variable is not GA yet in the current TiDB version. Evaluate it carefully at your own risk. - Scope: GLOBAL - Persists to cluster: Yes - Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): No - Type: Integer -- Default value: `0` -- Range: `0` or `[536870912, 9223372036854775807]` -- This variable controls the size of the schema cache in TiDB. The unit is byte. The default value is `0`, which means the cache limit feature is disabled. To enable this feature, you need to set a value within the range `[536870912, 9223372036854775807]`. TiDB will use this value as the maximum available memory limit and apply the Least Recently Used (LRU) algorithm to cache the required tables, effectively reducing the memory used by schema information. +- Default value: `536870912` (512 MiB) +- Range: `0` or `[67108864, 9223372036854775807]` +- Before TiDB v8.4.0, the default value of this variable is `0`. +- Starting from TiDB v8.4.0, the default value is `536870912`. +- This variable controls the size of the schema cache in TiDB. The unit is byte. If the value is `0`, it means the cache limit feature is disabled. To enable this feature, you need to set a value within the range `[67108864, 9223372036854775807]`. TiDB will use this value as the maximum available memory limit and apply the Least Recently Used (LRU) algorithm to cache the required tables, effectively reducing the memory used by schema information. ### tidb_schema_version_cache_limit New in v7.4.0 From 2e96798f888a5911321ab8aa8641a6fd46989f09 Mon Sep 17 00:00:00 2001 From: tiancaiamao Date: Thu, 26 Sep 2024 11:52:44 +0800 Subject: [PATCH 2/5] Update system-variables.md Co-authored-by: Frank945946 <108602632+Frank945946@users.noreply.github.com> --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 32e44e940e72..004793c53b84 100644 --- a/system-variables.md +++ b/system-variables.md @@ -5172,7 +5172,7 @@ SHOW WARNINGS; - Default value: `536870912` (512 MiB) - Range: `0` or `[67108864, 9223372036854775807]` - Before TiDB v8.4.0, the default value of this variable is `0`. -- Starting from TiDB v8.4.0, the default value is `536870912`. +- Starting from TiDB v8.4.0, the default value is `536870912`. The old values will still be used when upgrading from a lower version to v8.4.0 or above. - This variable controls the size of the schema cache in TiDB. The unit is byte. If the value is `0`, it means the cache limit feature is disabled. To enable this feature, you need to set a value within the range `[67108864, 9223372036854775807]`. TiDB will use this value as the maximum available memory limit and apply the Least Recently Used (LRU) algorithm to cache the required tables, effectively reducing the memory used by schema information. ### tidb_schema_version_cache_limit New in v7.4.0 From 40ac08db926e2699318cb40b6c29a5d38640a30d Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Wed, 9 Oct 2024 09:45:30 +0800 Subject: [PATCH 3/5] Update system-variables.md --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 004793c53b84..9dc3bb7a184d 100644 --- a/system-variables.md +++ b/system-variables.md @@ -5172,7 +5172,7 @@ SHOW WARNINGS; - Default value: `536870912` (512 MiB) - Range: `0` or `[67108864, 9223372036854775807]` - Before TiDB v8.4.0, the default value of this variable is `0`. -- Starting from TiDB v8.4.0, the default value is `536870912`. The old values will still be used when upgrading from a lower version to v8.4.0 or above. +- Starting from TiDB v8.4.0, the default value is `536870912`. When you upgrade from an earlier version to v8.4.0 or later, the old values will still be used. - This variable controls the size of the schema cache in TiDB. The unit is byte. If the value is `0`, it means the cache limit feature is disabled. To enable this feature, you need to set a value within the range `[67108864, 9223372036854775807]`. TiDB will use this value as the maximum available memory limit and apply the Least Recently Used (LRU) algorithm to cache the required tables, effectively reducing the memory used by schema information. ### tidb_schema_version_cache_limit New in v7.4.0 From 0b3dff61b06a05b4cd8e705c1572e9ad4e933b2c Mon Sep 17 00:00:00 2001 From: houfaxin Date: Wed, 9 Oct 2024 09:57:46 +0800 Subject: [PATCH 4/5] Update system-variables.md --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 9dc3bb7a184d..d524d22ba1d7 100644 --- a/system-variables.md +++ b/system-variables.md @@ -5163,7 +5163,7 @@ SHOW WARNINGS; > **Warning:** > -> The feature controlled by this variable is not GA yet in the current TiDB version. Evaluate it carefully at your own risk. +> The feature controlled by this variable is experimental. It is not recommended that you use it in the production environment. This feature might be changed or removed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub. - Scope: GLOBAL - Persists to cluster: Yes From dd6b02b91b7f15e9efb7657f4311f75a8cf6d9fa Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Wed, 9 Oct 2024 17:12:21 +0800 Subject: [PATCH 5/5] Update wording --- system-variables.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system-variables.md b/system-variables.md index d524d22ba1d7..0e88eabd5148 100644 --- a/system-variables.md +++ b/system-variables.md @@ -5172,8 +5172,8 @@ SHOW WARNINGS; - Default value: `536870912` (512 MiB) - Range: `0` or `[67108864, 9223372036854775807]` - Before TiDB v8.4.0, the default value of this variable is `0`. -- Starting from TiDB v8.4.0, the default value is `536870912`. When you upgrade from an earlier version to v8.4.0 or later, the old values will still be used. -- This variable controls the size of the schema cache in TiDB. The unit is byte. If the value is `0`, it means the cache limit feature is disabled. To enable this feature, you need to set a value within the range `[67108864, 9223372036854775807]`. TiDB will use this value as the maximum available memory limit and apply the Least Recently Used (LRU) algorithm to cache the required tables, effectively reducing the memory used by schema information. +- Starting from TiDB v8.4.0, the default value is `536870912`. When you upgrade from an earlier version to v8.4.0 or later, the old value set in the earlier version is used. +- This variable controls the size of the schema cache in TiDB. The unit is byte. Setting this variable to `0` means the cache limit feature is disabled. To enable this feature, you need to set a value within the range `[67108864, 9223372036854775807]`. TiDB will use this value as the maximum available memory limit and apply the Least Recently Used (LRU) algorithm to cache the required tables, effectively reducing the memory used by schema information. ### tidb_schema_version_cache_limit New in v7.4.0