From b27795b2daee565809dd156330479f6f0654d952 Mon Sep 17 00:00:00 2001 From: Ran Date: Tue, 7 Feb 2023 16:03:18 +0800 Subject: [PATCH 1/3] ddl: add tidb_ddl_distribute_reorg to sys var Signed-off-by: Ran --- system-variables.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/system-variables.md b/system-variables.md index ad2f66af70a0e..f3c52f73a04a8 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1141,6 +1141,19 @@ MPP is a distributed computing framework provided by the TiFlash engine, which a +### `tidb_ddl_distribute_reorg` New in v6.6.0 + +> **Warning:** +> +> - This feature is still in the experimental stage. +> - When this feature is enabled, TiDB only performs simple retries when an exception occurs during the DDL reorg phase. There is currently no retry method that is compatible with DDL operations. That is, you cannot control the number of retries using [`tidb_ddl_error_count_limit`](#tidb_ddl_error_count_limit). + +- Scope: GLOBAL +- Persists to cluster: Yes +- Default value: `OFF` +- This variable is used to control whether to enable distributed execution of the DDL reorg phase to improve the speed of this phase. Currently, this variable is only valid for the `ADD INDEX` statement. Enabling this variable improves the performance of large tables. Distributed DDL execution can control the CPU usage of DDL through dynamic DDL resource management to prevent DDL from affecting the online application. +- To verify whether a completed `ADD INDEX` operation is accelerated by this feature, you can check whether a corresponding task is in the `mysql.tidb_ddl_backfill_history` table. + ### tidb_ddl_error_count_limit - Scope: GLOBAL From 13a975e73fcc80487d3e5ef8eba41abd9b8dfaad Mon Sep 17 00:00:00 2001 From: Ran Date: Tue, 7 Feb 2023 16:45:50 +0800 Subject: [PATCH 2/3] Update system-variables.md Co-authored-by: TomShawn <41534398+TomShawn@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 f3c52f73a04a8..95d1c10f606de 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1145,7 +1145,7 @@ MPP is a distributed computing framework provided by the TiFlash engine, which a > **Warning:** > -> - This feature is still in the experimental stage. +> - This feature is still in the experimental stage. It is not recommended to enable this feature in production environments. > - When this feature is enabled, TiDB only performs simple retries when an exception occurs during the DDL reorg phase. There is currently no retry method that is compatible with DDL operations. That is, you cannot control the number of retries using [`tidb_ddl_error_count_limit`](#tidb_ddl_error_count_limit). - Scope: GLOBAL From f1a93b20db39b127fee56110af1efa42896fd7a6 Mon Sep 17 00:00:00 2001 From: Ran Date: Thu, 16 Feb 2023 12:10:13 +0800 Subject: [PATCH 3/3] Update system-variables.md Co-authored-by: Lynn --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 95d1c10f606de..fa2e196ad572f 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1152,7 +1152,7 @@ MPP is a distributed computing framework provided by the TiFlash engine, which a - Persists to cluster: Yes - Default value: `OFF` - This variable is used to control whether to enable distributed execution of the DDL reorg phase to improve the speed of this phase. Currently, this variable is only valid for the `ADD INDEX` statement. Enabling this variable improves the performance of large tables. Distributed DDL execution can control the CPU usage of DDL through dynamic DDL resource management to prevent DDL from affecting the online application. -- To verify whether a completed `ADD INDEX` operation is accelerated by this feature, you can check whether a corresponding task is in the `mysql.tidb_ddl_backfill_history` table. +- To verify whether a completed `ADD INDEX` operation is accelerated by this feature, you can check whether a corresponding task is in the `mysql.tidb_background_subtask_history` table. ### tidb_ddl_error_count_limit