From c3b660ede0c054b5b2460407286bbf1f7a121546 Mon Sep 17 00:00:00 2001
From: cbcwestwolf <1004626265@qq.com>
Date: Mon, 18 Nov 2024 14:19:40 +0800
Subject: [PATCH 1/7] 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 ae35e1576ebf2..d5313478d48e6 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1695,6 +1695,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 755b1a40a95787b04a0ed8acbaebafea63b580c2 Mon Sep 17 00:00:00 2001
From: CbcWestwolf <1004626265@qq.com>
Date: Mon, 18 Nov 2024 15:25:21 +0800
Subject: [PATCH 2/7] 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 d5313478d48e6..e57d9648bfbcc 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1695,15 +1695,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 9d9c2cb3142bcf7f7050df3b25145ddacaaf0683 Mon Sep 17 00:00:00 2001
From: CbcWestwolf <1004626265@qq.com>
Date: Tue, 19 Nov 2024 16:18:54 +0800
Subject: [PATCH 3/7] 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 e57d9648bfbcc..986dbdfc6acad 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1703,7 +1703,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 07a18498542927ffdafd7073d05a19a237d51939 Mon Sep 17 00:00:00 2001
From: cbcwestwolf <1004626265@qq.com>
Date: Tue, 19 Nov 2024 16:38:03 +0800
Subject: [PATCH 4/7] update
---
system-variables.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/system-variables.md b/system-variables.md
index 986dbdfc6acad..f1d1c4dd06fbe 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1703,7 +1703,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 54b8e2e37ab0f26490fc1e9d8f411e83210c6b10 Mon Sep 17 00:00:00 2001
From: cbcwestwolf <1004626265@qq.com>
Date: Tue, 19 Nov 2024 16:51:45 +0800
Subject: [PATCH 5/7] update
---
system-variables.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/system-variables.md b/system-variables.md
index f1d1c4dd06fbe..5643acddb5841 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1703,7 +1703,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 a6f0ef960eb663c2e202b703bd69419052c59dc2 Mon Sep 17 00:00:00 2001
From: Grace Cai
Date: Tue, 26 Nov 2024 14:21:02 +0800
Subject: [PATCH 6/7] 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 5643acddb5841..e40c00f4db81d 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1703,7 +1703,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 fe33fbce7970d68d5dfafa4fde2786117803adf3 Mon Sep 17 00:00:00 2001
From: Grace Cai
Date: Tue, 26 Nov 2024 16:17:14 +0800
Subject: [PATCH 7/7] 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 e40c00f4db81d..bd00ca866120d 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1704,7 +1704,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