From cc3fe011ff37744069b2cd4c64d78b9a93b82279 Mon Sep 17 00:00:00 2001
From: cbcwestwolf <1004626265@qq.com>
Date: Mon, 18 Nov 2024 14:19:40 +0800
Subject: [PATCH 1/8] tidb: add description for var
tidb_ddl_reorg_max_write_speed
---
system-variables.md | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/system-variables.md b/system-variables.md
index 739f713ccefcb..96db9cd2fb310 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1659,6 +1659,16 @@ mysql> SELECT job_info FROM mysql.analyze_jobs ORDER BY end_time DESC LIMIT 1;
- This variable is used to set the priority of executing the `ADD INDEX` operation in the `re-organize` phase.
- You can set the value of this variable to `PRIORITY_LOW`, `PRIORITY_NORMAL` or `PRIORITY_HIGH`.
+### `tidb_ddl_reorg_max_write_speed` New in v8.5.0
+
+- 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, 1125899906842624]` (i.e. the maximum value that can be set is 1 PiB)
+- This variable only takes effect when index creation acceleration is enabled (by [`tidb_ddl_enable_fast_reorg`](#tidb_ddl_enable_fast_reorg-new-in-v630)). It limits the bandwidth in which writing data into each TiKV. The default value `0` means no writing limitation. The default unit is bytes per second. You can also set this variable to values like `'1GiB'`, `'256MiB`.
+
### tidb_ddl_reorg_worker_cnt
> **Note:**
From c66e457e58e764e97d60d6d6e0c8cf0e1105be0d Mon Sep 17 00:00:00 2001
From: CbcWestwolf <1004626265@qq.com>
Date: Mon, 18 Nov 2024 15:25:21 +0800
Subject: [PATCH 2/8] Apply suggestions from code review
Co-authored-by: Grace Cai
---
system-variables.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/system-variables.md b/system-variables.md
index 96db9cd2fb310..6c6503bc0467b 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1659,15 +1659,15 @@ mysql> SELECT job_info FROM mysql.analyze_jobs ORDER BY end_time DESC LIMIT 1;
- This variable is used to set the priority of executing the `ADD INDEX` operation in the `re-organize` phase.
- You can set the value of this variable to `PRIORITY_LOW`, `PRIORITY_NORMAL` or `PRIORITY_HIGH`.
-### `tidb_ddl_reorg_max_write_speed` New in v8.5.0
+### tidb_ddl_reorg_max_write_speed New in v8.5.0
- 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, 1125899906842624]` (i.e. the maximum value that can be set is 1 PiB)
-- This variable only takes effect when index creation acceleration is enabled (by [`tidb_ddl_enable_fast_reorg`](#tidb_ddl_enable_fast_reorg-new-in-v630)). It limits the bandwidth in which writing data into each TiKV. The default value `0` means no writing limitation. The default unit is bytes per second. You can also set this variable to values like `'1GiB'`, `'256MiB`.
+- Range: `[0, 1125899906842624]` (the maximum value that can be set is 1 PiB)
+- This variable only takes effect when index creation acceleration is enabled (controlled by the [`tidb_ddl_enable_fast_reorg`](#tidb_ddl_enable_fast_reorg-new-in-v630) variable). It limits the write bandwidth for each TiKV node. The default value `0` means no write bandwidth limit. The default unit is bytes per second. You can also set the value in formats such as `'1GiB'` or `'256MiB`.
### tidb_ddl_reorg_worker_cnt
From b10231d6fab38f93e30d3ead26dfeb8bdbadb0f4 Mon Sep 17 00:00:00 2001
From: CbcWestwolf <1004626265@qq.com>
Date: Tue, 19 Nov 2024 16:18:54 +0800
Subject: [PATCH 3/8] Update system-variables.md
Co-authored-by: Aolin
---
system-variables.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/system-variables.md b/system-variables.md
index 6c6503bc0467b..9cef174788eb1 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1667,7 +1667,7 @@ mysql> SELECT job_info FROM mysql.analyze_jobs ORDER BY end_time DESC LIMIT 1;
- Type: Integer
- Default value: `0`
- Range: `[0, 1125899906842624]` (the maximum value that can be set is 1 PiB)
-- This variable only takes effect when index creation acceleration is enabled (controlled by the [`tidb_ddl_enable_fast_reorg`](#tidb_ddl_enable_fast_reorg-new-in-v630) variable). It limits the write bandwidth for each TiKV node. The default value `0` means no write bandwidth limit. The default unit is bytes per second. You can also set the value in formats such as `'1GiB'` or `'256MiB`.
+- This variable limits the write bandwidth for each TiKV node and only takes effect when index creation acceleration is enabled (controlled by the [`tidb_ddl_enable_fast_reorg`](#tidb_ddl_enable_fast_reorg-new-in-v630) variable). The default value `0` means no write bandwidth limit. The default unit is bytes per second. You can also set the value in formats such as `'1GiB'` or `'256MiB`.
### tidb_ddl_reorg_worker_cnt
From 86285a752af891c70d396f0094191d36a77cda47 Mon Sep 17 00:00:00 2001
From: cbcwestwolf <1004626265@qq.com>
Date: Tue, 19 Nov 2024 16:38:03 +0800
Subject: [PATCH 4/8] update
---
system-variables.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/system-variables.md b/system-variables.md
index 9cef174788eb1..399836ec69c82 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1667,7 +1667,8 @@ mysql> SELECT job_info FROM mysql.analyze_jobs ORDER BY end_time DESC LIMIT 1;
- Type: Integer
- Default value: `0`
- Range: `[0, 1125899906842624]` (the maximum value that can be set is 1 PiB)
-- This variable limits the write bandwidth for each TiKV node and only takes effect when index creation acceleration is enabled (controlled by the [`tidb_ddl_enable_fast_reorg`](#tidb_ddl_enable_fast_reorg-new-in-v630) variable). The default value `0` means no write bandwidth limit. The default unit is bytes per second. You can also set the value in formats such as `'1GiB'` or `'256MiB`.
+- This variable limits the write bandwidth for each TiKV node and only takes effect when index creation acceleration is enabled (controlled by the [`tidb_ddl_enable_fast_reorg`](#tidb_ddl_enable_fast_reorg-new-in-v630) variable). When the data size in the cluster is quite large, limiting the write bandwidth for index creation can reduce the impact of the frontend workload.
+- The default value `0` means no write bandwidth limit. The default unit is bytes per second. You can also set the value in formats such as `'1GiB'` or `'256MiB`.
### tidb_ddl_reorg_worker_cnt
From 5e82798b6195ae0c7b34b300bfaa1d3f40ca313a Mon Sep 17 00:00:00 2001
From: cbcwestwolf <1004626265@qq.com>
Date: Tue, 19 Nov 2024 16:51:45 +0800
Subject: [PATCH 5/8] update
---
system-variables.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/system-variables.md b/system-variables.md
index 399836ec69c82..05a0ae0fcacea 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1667,7 +1667,7 @@ mysql> SELECT job_info FROM mysql.analyze_jobs ORDER BY end_time DESC LIMIT 1;
- Type: Integer
- Default value: `0`
- Range: `[0, 1125899906842624]` (the maximum value that can be set is 1 PiB)
-- This variable limits the write bandwidth for each TiKV node and only takes effect when index creation acceleration is enabled (controlled by the [`tidb_ddl_enable_fast_reorg`](#tidb_ddl_enable_fast_reorg-new-in-v630) variable). When the data size in the cluster is quite large, limiting the write bandwidth for index creation can reduce the impact of the frontend workload.
+- This variable limits the write bandwidth for each TiKV node and only takes effect when index creation acceleration is enabled (controlled by the [`tidb_ddl_enable_fast_reorg`](#tidb_ddl_enable_fast_reorg-new-in-v630) variable). When the data size in the cluster is quite large, limiting the write bandwidth for index creation can reduce the impact on the frontend workload.
- The default value `0` means no write bandwidth limit. The default unit is bytes per second. You can also set the value in formats such as `'1GiB'` or `'256MiB`.
### tidb_ddl_reorg_worker_cnt
From 0415cb660f3cd1a5703361088b797ec960abe04b Mon Sep 17 00:00:00 2001
From: Grace Cai
Date: Tue, 26 Nov 2024 14:21:02 +0800
Subject: [PATCH 6/8] 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 05a0ae0fcacea..73e07c475eb3a 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1667,7 +1667,7 @@ mysql> SELECT job_info FROM mysql.analyze_jobs ORDER BY end_time DESC LIMIT 1;
- Type: Integer
- Default value: `0`
- Range: `[0, 1125899906842624]` (the maximum value that can be set is 1 PiB)
-- This variable limits the write bandwidth for each TiKV node and only takes effect when index creation acceleration is enabled (controlled by the [`tidb_ddl_enable_fast_reorg`](#tidb_ddl_enable_fast_reorg-new-in-v630) variable). When the data size in the cluster is quite large, limiting the write bandwidth for index creation can reduce the impact on the frontend workload.
+- This variable limits the write bandwidth for each TiKV node and only takes effect when index creation acceleration is enabled (controlled by the [`tidb_ddl_enable_fast_reorg`](#tidb_ddl_enable_fast_reorg-new-in-v630) variable). When the data size in your cluster is quite large (such as billions of rows), limiting the write bandwidth for index creation can effectively reduce the impact on application workloads.
- The default value `0` means no write bandwidth limit. The default unit is bytes per second. You can also set the value in formats such as `'1GiB'` or `'256MiB`.
### tidb_ddl_reorg_worker_cnt
From fa01e2f2dad8fa5ffb6b6c29192f582c3053d98b Mon Sep 17 00:00:00 2001
From: Grace Cai
Date: Tue, 26 Nov 2024 16:17:14 +0800
Subject: [PATCH 7/8] minor format updates
---
system-variables.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/system-variables.md b/system-variables.md
index 73e07c475eb3a..dafd7e1534f21 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1668,7 +1668,7 @@ mysql> SELECT job_info FROM mysql.analyze_jobs ORDER BY end_time DESC LIMIT 1;
- Default value: `0`
- Range: `[0, 1125899906842624]` (the maximum value that can be set is 1 PiB)
- This variable limits the write bandwidth for each TiKV node and only takes effect when index creation acceleration is enabled (controlled by the [`tidb_ddl_enable_fast_reorg`](#tidb_ddl_enable_fast_reorg-new-in-v630) variable). When the data size in your cluster is quite large (such as billions of rows), limiting the write bandwidth for index creation can effectively reduce the impact on application workloads.
-- The default value `0` means no write bandwidth limit. The default unit is bytes per second. You can also set the value in formats such as `'1GiB'` or `'256MiB`.
+- The default value `0` means no write bandwidth limit. The default unit is bytes per second. You can also set the value in formats such as `'1GiB'` or `'256MiB'`.
### tidb_ddl_reorg_worker_cnt
From ec148ff11e4f3bc23690e5be774cc7ba57d22ab7 Mon Sep 17 00:00:00 2001
From: CbcWestwolf <1004626265@qq.com>
Date: Fri, 13 Dec 2024 10:40:54 +0800
Subject: [PATCH 8/8] Update system-variables.md
Co-authored-by: Aolin
---
system-variables.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/system-variables.md b/system-variables.md
index dafd7e1534f21..38db67f6f4aac 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1659,7 +1659,7 @@ mysql> SELECT job_info FROM mysql.analyze_jobs ORDER BY end_time DESC LIMIT 1;
- This variable is used to set the priority of executing the `ADD INDEX` operation in the `re-organize` phase.
- You can set the value of this variable to `PRIORITY_LOW`, `PRIORITY_NORMAL` or `PRIORITY_HIGH`.
-### tidb_ddl_reorg_max_write_speed New in v8.5.0
+### tidb_ddl_reorg_max_write_speed New in v7.5.5
- Scope: GLOBAL
- Persists to cluster: Yes