Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tidb_service_scope not works for Distributed eXecution Framework #50104

Closed
aytrack opened this issue Jan 5, 2024 · 0 comments · Fixed by #50108
Closed

tidb_service_scope not works for Distributed eXecution Framework #50104

aytrack opened this issue Jan 5, 2024 · 0 comments · Fixed by #50108
Labels
component/ddl This issue is related to DDL of TiDB. severity/critical type/bug This issue is a bug.

Comments

@aytrack
Copy link
Contributor

aytrack commented Jan 5, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. deploy cluster with 3 tidb nodes
  2. connect to tidb-0 and tidb-2 execute sql set global tidb_service_scope = "background";
  3. check the mysql.dist_framework_meta
  4. Import data

2. What did you expect to see? (Required)

only background tidb nodes works for import data

3. What did you see instead (Required)

all the tidb nodes running for import data

[11:13:58]TiDB root:(none)> set global tidb_service_scope = "background";
Query OK, 0 rows affected
[11:14:00]TiDB root:(none)> select * from mysql.dist_framework_meta;
+---------------------------------------------------------------------------+------+-----------+-------------+
| host                                                                      | role | cpu_count | keyspace_id |
+---------------------------------------------------------------------------+------+-----------+-------------+
| tc-tidb-1.tc-tidb-peer.testbed-global-operator-tps-5550170-1-849.svc:4000 |      | 16        | -1          |
| tc-tidb-0.tc-tidb-peer.testbed-global-operator-tps-5550170-1-849.svc:4000 |      | 16        | -1          |
| tc-tidb-2.tc-tidb-peer.testbed-global-operator-tps-5550170-1-849.svc:4000 |      | 16        | -1          |
+---------------------------------------------------------------------------+------+-----------+-------------+

11:18:03]TiDB root:test> select id, task_key, type, state, step, exec_id, cast(error as char) from mysql.tidb_background_subtask where task_key = 1;
+----+----------+------+---------+------+---------------------------------------------------------------------------+---------------------+
| id | task_key | type | state   | step | exec_id                                                                   | cast(error as char) |
+----+----------+------+---------+------+---------------------------------------------------------------------------+---------------------+
| 1  | 1        | 2    | running | 3    | tc-tidb-0.tc-tidb-peer.testbed-global-operator-tps-5550170-1-849.svc:4000 | <null>              |
| 2  | 1        | 2    | running | 3    | tc-tidb-1.tc-tidb-peer.testbed-global-operator-tps-5550170-1-849.svc:4000 | <null>              |
| 3  | 1        | 2    | running | 3    | tc-tidb-2.tc-tidb-peer.testbed-global-operator-tps-5550170-1-849.svc:4000 | <null>              |
+----+----------+------+---------+------+---------------------------------------------------------------------------+---------------------+

4. What is your TiDB version? (Required)

[11:16:16]TiDB root:(none)> select tidb_version();
+-----------------------------------------------------------+
| tidb_version()                                            |
+-----------------------------------------------------------+
| Release Version: v7.6.0-alpha                             |
| Edition: Community                                        |
| Git Commit Hash: 62c83d40fe2ed742bfaf4b7c64eca0bb1853a94d |
| Git Branch: heads/refs/tags/v7.6.0-alpha                  |
| UTC Build Time: 2024-01-04 14:31:13                       |
| GoVersion: go1.21.5                                       |
| Race Enabled: false                                       |
| Check Table Before Drop: false                            |
| Store: tikv                                               |
+-----------------------------------------------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/ddl This issue is related to DDL of TiDB. severity/critical type/bug This issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants