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

ddl rollingback is freezed #45746

Open
chinesezhaoyun opened this issue Aug 2, 2023 · 3 comments
Open

ddl rollingback is freezed #45746

chinesezhaoyun opened this issue Aug 2, 2023 · 3 comments
Labels
affects-7.5 affects-8.1 component/ddl This issue is related to DDL of TiDB. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 severity/major type/bug The issue is confirmed as a bug.

Comments

@chinesezhaoyun
Copy link

chinesezhaoyun commented Aug 2, 2023

Bug Report

1. Minimal reproduce step (Required)

Cancel ddl state is freezed.

Asktug DDL rollingback 阻塞
Asktug 批量执行DDL处于done状态

Step as follow. But I can't reproduce the issue.

Enable variables
SET GLOBAL tidb_enable_metadata_lock = 'ON' ;
SET GLOBAL tidb_ddl_enable_fast_reorg = 'ON' ;

  1. add index on big table
  2. cancel add index
  3. scale-out a tidb node
  4. scale-in a tidb node
  5. restart tidb node
+--------+--------------------------+-------------------------------------+---------------------------+-----------------------+-----------+----------+-----------+---------------------+---------------------+---------------------+-------------+
| JOB_ID | DB_NAME                  | TABLE_NAME                          | JOB_TYPE                  | SCHEMA_STATE          | SCHEMA_ID | TABLE_ID | ROW_COUNT | CREATE_TIME         | START_TIME          | END_TIME            | STATE       |
+--------+--------------------------+-------------------------------------+---------------------------+-----------------------+-----------+----------+-----------+---------------------+---------------------+---------------------+-------------+
|  23333 | spider_company_entity    | spider_enterprise_regno_sd_info     | add index /* txn-merge */ | delete reorganization |     16417 |    16627 | 142555210 | 2023-07-21 14:43:55 | 2023-07-21 14:43:55 | NULL                | rollingback |
|  23335 | spider_company_entity    | spider_enterprise_regno_sd_gt_info  | add index /* txn-merge */ | delete reorganization |     16417 |    16651 |  10023574 | 2023-07-21 14:59:12 | 2023-07-21 14:59:12 | NULL                | rollingback |
|  23357 | spider_company_entity    | spider_enterprise_regno_sd_info     | add index                 | none                  |     16417 |    16627 |         0 | 2023-07-21 16:26:56 | NULL                | NULL                | cancelling  |
|  24256 | spider_company_entity    | spider_enterprise_regno_sd_gt_info  | rename table              | none                  |     16417 |    16651 |         0 | 2023-08-01 18:14:06 | NULL                | NULL                | cancelling  |
|  24316 | spider_company_test      | t_proposed_notice_structural_middle | modify column             | public                |      7200 |    23199 |         0 | 2023-08-02 11:09:29 | 2023-08-02 11:09:29 | 2023-08-02 11:09:29 | synced      |
|  24315 | spider_company_base_info | t_proposed_notice_structural_middle | modify column             | public                |     13300 |    24191 |         0 | 2023-08-02 11:09:14 | 2023-08-02 11:09:14 | 2023-08-02 11:09:15 | synced      |
+--------+--------------------------+-------------------------------------+---------------------------+-----------------------+-----------+----------+-----------+---------------------+---------------------+---------------------+-------------+

tidb log

[2023/08/02 13:53:01.117 +08:00] [INFO] [syncer.go:333] ["[ddl] syncer check all versions, someone is not synced"] [info="instance ip xx.xx.xx.xx, port 5000, id e8f6e8b5-c2fa-48c1-94e5-89094a9b7729"] ["ddl id"=23335] [ver=17987]
[2023/08/02 13:53:01.139 +08:00] [INFO] [syncer.go:333] ["[ddl] syncer check all versions, someone is not synced"] [info="instance ip xx.xx.xx.xx, port 5000, id 82ad37d5-2f61-4616-af37-47cc32984a59"] ["ddl id"=23335] [ver=17987]
[2023/08/02 13:53:01.139 +08:00] [INFO] [syncer.go:333] ["[ddl] syncer check all versions, someone is not synced"] [info="instance ip xx.xx.xx.xx, port 5000, id 82ad37d5-2f61-4616-af37-47cc32984a59"] ["ddl id"=23333] [ver=17988]
[2023/08/02 13:53:01.139 +08:00] [INFO] [syncer.go:333] ["[ddl] syncer check all versions, someone is not synced"] [info="instance ip xx.xx.xx.xx, port 5000, id e8f6e8b5-c2fa-48c1-94e5-89094a9b7729"] ["ddl id"=23333] [ver=17988]
[2023/08/02 13:53:01.139 +08:00] [INFO] [syncer.go:333] ["[ddl] syncer check all versions, someone is not synced"] [info="instance ip xx.xx.xx.xx, port 5000, id e8f6e8b5-c2fa-48c1-94e5-89094a9b7729"] ["ddl id"=23335] [ver=17987]
[2023/08/02 13:53:01.161 +08:00] [INFO] [syncer.go:333] ["[ddl] syncer check all versions, someone is not synced"] [info="instance ip xx.xx.xx.xx, port 5000, id 82ad37d5-2f61-4616-af37-47cc32984a59"] ["ddl id"=23335] [ver=17987]
[2023/08/02 13:53:01.161 +08:00] [INFO] [syncer.go:333] ["[ddl] syncer check all versions, someone is not synced"] [info="instance ip xx.xx.xx.xx, port 5000, id e8f6e8b5-c2fa-48c1-94e5-89094a9b7729"] ["ddl id"=23335] [ver=17987]
[2023/08/02 13:53:01.161 +08:00] [INFO] [syncer.go:333] ["[ddl] syncer check all versions, someone is not synced"] [info="instance ip xx.xx.xx.xx, port 5000, id e8f6e8b5-c2fa-48c1-94e5-89094a9b7729"] ["ddl id"=23333] [ver=17988]
[2023/08/02 13:53:01.161 +08:00] [INFO] [syncer.go:333] ["[ddl] syncer check all versions, someone is not synced"] [info="instance ip xx.xx.xx.xx, port 5000, id 82ad37d5-2f61-4616-af37-47cc32984a59"] ["ddl id"=23333] [ver=17988]
[2023/08/02 13:53:01.183 +08:00] [INFO] [syncer.go:333] ["[ddl] syncer check all versions, someone is not synced"] [info="instance ip xx.xx.xx.xx, port 5000, id 82ad37d5-2f61-4616-af37-47cc32984a59"] ["ddl id"=23333] [ver=17988]
[2023/08/02 13:53:01.183 +08:00] [INFO] [syncer.go:333] ["[ddl] syncer check all versions, someone is not synced"] [info="instance ip xx.xx.xx.xx, port 5000, id e8f6e8b5-c2fa-48c1-94e5-89094a9b7729"] ["ddl id"=23333] [ver=17988]
[2023/08/02 13:53:01.183 +08:00] [INFO] [syncer.go:333] ["[ddl] syncer check all versions, someone is not synced"] [info="instance ip xx.xx.xx.xx, port 5000, id 82ad37d5-2f61-4616-af37-47cc32984a59"] ["ddl id"=23335] [ver=17987]
[2023/08/02 13:53:01.183 +08:00] [INFO] [syncer.go:333] ["[ddl] syncer check all versions, someone is not synced"] [info="instance ip xx.xx.xx.xx, port 5000, id e8f6e8b5-c2fa-48c1-94e5-89094a9b7729"] ["ddl id"=23335] [ver=17987]
[2023/08/02 13:53:01.213 +08:00] [INFO] [syncer.go:333] ["[ddl] syncer check all versions, someone is not synced"] [info="instance ip xx.xx.xx.xx, port 5000, id e8f6e8b5-c2fa-48c1-94e5-89094a9b7729"] ["ddl id"=23335] [ver=17987]
[2023/08/02 13:53:01.213 +08:00] [INFO] [syncer.go:333] ["[ddl] syncer check all versions, someone is not synced"] [info="instance ip xx.xx.xx.xx, port 5000, id 82ad37d5-2f61-4616-af37-47cc32984a59"] ["ddl id"=23335] [ver=17987]
[2023/08/02 13:53:01.213 +08:00] [INFO] [syncer.go:333] ["[ddl] syncer check all versions, someone is not synced"] [info="instance ip xx.xx.xx.xx, port 5000, id 82ad37d5-2f61-4616-af37-47cc32984a59"] ["ddl id"=23333] [ver=17988]
[2023/08/02 13:53:01.213 +08:00] [INFO] [syncer.go:333] ["[ddl] syncer check all versions, someone is not synced"] [info="instance ip xx.xx.xx.xx, port 5000, id e8f6e8b5-c2fa-48c1-94e5-89094a9b7729"] ["ddl id"=23333] [ver=17988]

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

ddl state is synced.

3. What did you see instead (Required)

Create new table and load data.

4. What is your TiDB version? (Required)

Release Version: v6.5.3
Edition: Community
Git Commit Hash: 71e6696
Git Branch: heads/refs/tags/v6.5.3
UTC Build Time: 2023-06-12 13:52:32
GoVersion: go1.19.9
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: tikv

@chinesezhaoyun chinesezhaoyun added the type/bug The issue is confirmed as a bug. label Aug 2, 2023
@ti-chi-bot ti-chi-bot bot added may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 labels Aug 2, 2023
@wjhuang2016
Copy link
Member

@chinesezhaoyun Hi, Can it recover after some minutes?

@chinesezhaoyun
Copy link
Author

@wjhuang2016 It still hasn't recovered. How can I fix it.

@wjhuang2016
Copy link
Member

wjhuang2016 commented Aug 7, 2023

@wjhuang2016 It still hasn't recovered. How can I fix it.

@chinesezhaoyun
I replied to you in Asktug 批量执行DDL处于done状态, we can share the information there.

@bb7133 bb7133 added component/ddl This issue is related to DDL of TiDB. and removed sig/sql-infra SIG: SQL Infra labels Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.5 affects-8.1 component/ddl This issue is related to DDL of TiDB. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

5 participants