From 2e4abec5215da23b2d7aaa83c5c07b5373464a28 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 d792f7075c50c..ed31e9c85c140 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1426,6 +1426,16 @@ MPP is a distributed computing framework provided by the TiFlash engine, which a
- 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 b0f9c7c44a88c7b6b164cf77e658d4ee77a077ab 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 ed31e9c85c140..1a4d0e2f670de 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1426,15 +1426,15 @@ MPP is a distributed computing framework provided by the TiFlash engine, which a
- 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 e90090d6e16ab6d51be8cfd248aae03eade1c1b5 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 1a4d0e2f670de..cc19940320525 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1434,7 +1434,7 @@ MPP is a distributed computing framework provided by the TiFlash engine, which a
- 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 7260232965484c9ae310b791873475612f0cedcb 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 cc19940320525..c5b8620d49b4e 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1434,7 +1434,8 @@ MPP is a distributed computing framework provided by the TiFlash engine, which a
- 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 7a0487a70e54dadb0624ee2ee178b95c33484937 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 c5b8620d49b4e..ecb4aa074ffc7 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1434,7 +1434,7 @@ MPP is a distributed computing framework provided by the TiFlash engine, which a
- 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 0baf132ade0734ff46b4b59bfe256c3d1197b855 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 ecb4aa074ffc7..c3e7eaa517c9c 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1434,7 +1434,7 @@ MPP is a distributed computing framework provided by the TiFlash engine, which a
- 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 422f9e00138f9f4ab58ba729ee0c3e69094d75a7 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 c3e7eaa517c9c..add7ceb66ddb4 100644
--- a/system-variables.md
+++ b/system-variables.md
@@ -1435,7 +1435,7 @@ MPP is a distributed computing framework provided by the TiFlash engine, which a
- 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