Skip to content

Commit

Permalink
sysvar: add a note about tidb_service_scope (#16356) (#16357)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot committed Jan 29, 2024
1 parent ff3573f commit d3b7e1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -4856,6 +4856,7 @@ SHOW WARNINGS;
> **Note:**
>
> - If `tidb_service_scope` is not set for any TiDB node in a cluster, the DXF schedules all TiDB nodes to execute background tasks. If you are concerned about performance impact on current business, you can set `tidb_service_scope` to `background` for a few of the TiDB nodes. Only those nodes will execute background tasks.
> - In a cluster with several TiDB nodes, it is strongly recommended to set this system variable to `background` on two or more TiDB nodes. If `tidb_service_scope` is set on a single TiDB node only, when the node is restarted or fails, the task will be rescheduled to other TiDB nodes that lack the `background` setting, which will affect these TiDB nodes.
> - For newly scaled nodes, the DXF tasks are not executed by default to avoid consuming the resources of the scaled node. If you want this scaled node to execute background tasks, you need to manually set `tidb_service_scop` of this node to `background`.
### tidb_session_alias <span class="version-mark">New in v7.4.0</span>
Expand Down
2 changes: 1 addition & 1 deletion tidb-distributed-execution-framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Adjust the following system variables related to Fast Online DDL:

> **Note:**
>
> - During the execution of a distributed task, if some TiDB nodes are offline, the distributed task randomly assigns subtasks to available TiDB nodes instead of dynamically assigning subtasks according to `tidb_service_scope`.
> - In a cluster with several TiDB nodes, it is strongly recommended to set `tidb_service_scope` to `background` on two or more TiDB nodes. If `tidb_service_scope` is set on a single TiDB node only, when the node is restarted or fails, the task will be rescheduled to other TiDB nodes that lack the `background` setting, which will affect these TiDB nodes.
> - During the execution of a distributed task, changes to the `tidb_service_scope` configuration will not take effect for the current task, but will take effect from the next task.
## Implementation principles
Expand Down

0 comments on commit d3b7e1f

Please sign in to comment.