Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 取消执行DDL卡死
[TiDB Usage Environment]
Production Environment
[TiDB Version]
7.5.0
[Reproduction Path]
Adding an index to a data table using DBeaver
[Encountered Issue: Symptoms and Impact]
Occasionally, the process freezes when adding an index to a data table. After canceling the task using the ADMIN CANCEL DDL JOB and KILL TIDB QUERY commands, it indicates success, but the process remains in a canceling state.
[Resource Configuration]
Navigate to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots/Logs/Monitoring]
I see the version is 7.5. Adding an index might be causing an MDL lock. You can check it out here:
According to the documentation, you need to kill this lock process.
You can try restarting the DDL owner, refer to this link: SQL 操作常见问题 | PingCAP 文档中心
Try killing the process lock first.
I have encountered this problem before. If there are multiple TiDB nodes, stop the other nodes leaving only one node, and then restart this node.
I found the process ID, but I can’t kill it.
In a production environment, you can’t just restart randomly…
Use tiup to restart all TiDB servers.
If CANCEL can be executed successfully, it is not an MDL issue. You can check the current DDL queue and the status of the currently running DDL before making a judgment.