From 63fd4759e24181d357714b923986f74566204d22 Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Wed, 1 Apr 2026 11:12:19 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"Revert=20"v8.5.6:=20system-variables:?= =?UTF-8?q?=20add=20doc=20for=20`tidb=5Fmax=5Fdist=5Ftask=5Fnod=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit d6f3bcf7c09e60e3a9c587fbb39784fcd80381b5. --- system-variables.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/system-variables.md b/system-variables.md index d736b0cac6381..db6c1bba07583 100644 --- a/system-variables.md +++ b/system-variables.md @@ -3888,6 +3888,22 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Range: `[100, 16384]` - This variable is used to set the maximum number of schema versions (the table IDs modified for corresponding versions) allowed to be cached. The value range is 100 ~ 16384. +### tidb_max_dist_task_nodes New in v8.5.6 + +- Scope: SESSION | GLOBAL +- Persists to cluster: Yes +- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): No +- Type: Integer +- Default value: `-1` +- Range: `-1` or `[1, 128]` +- This variable defines the maximum number of TiDB nodes that the Distributed eXecution Framework (DXF) tasks can use. The default value is `-1`, which indicates that automatic mode is enabled. In automatic mode, TiDB dynamically calculates the value as `min(3, tikv_nodes / 3)`, where `tikv_nodes` represents the number of TiKV nodes in the cluster. + +> **Note:** +> +> If you explicitly set the [`tidb_service_scope`](#tidb_service_scope-new-in-v740) system variable for some TiDB nodes, the Distributed eXecution Framework schedules tasks only to these nodes. In this case, even if you set `tidb_max_dist_task_nodes` to a larger value, the framework uses no more than the number of nodes explicitly configured with `tidb_service_scope`. +> +> For example, if the cluster has 10 TiDB nodes, and 4 of them are configured with `tidb_service_scope = group1`, then even if you set `tidb_max_dist_task_nodes = 5`, only 4 nodes participate in task execution. + ### tidb_max_paging_size New in v6.3.0 - Scope: SESSION | GLOBAL