From 716d1a811ce50d2e589db4ce7ee10b1fe20caa6b 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 b020683f80ceb..e17d379142bc5 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1699,6 +1699,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 65842fe6faa9c9a2060fbd1cbed01aa8e8d37e5f 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 e17d379142bc5..7293755cd5378 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1699,15 +1699,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 3a708d44d01ed7f7f8d774be180ac4340dd14ab3 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 7293755cd5378..8bd78f0da6e9a 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1707,7 +1707,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 f9491173435327eb2c8de72b2a27533571d6a9fb 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 8bd78f0da6e9a..1706d9d47765c 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1707,7 +1707,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 115ddb89217fee9c04e05735b4a4c0cead530e6e 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 1706d9d47765c..b1c44ddaf391d 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1707,7 +1707,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 3b8e4405fb9974cd9f0418f96b641750c0866eb5 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 b1c44ddaf391d..4993d38eb14a4 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1707,7 +1707,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 3bdc1c584c48baa77a9a491c3a919c9dea2d3383 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 4993d38eb14a4..0964e1a186a83 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1708,7 +1708,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