Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: ddl操作hang住,怎么处理?
I have a question. There is a DDL statement that has not been completed for a long time. I used admin cancel on them, but the status remains as cancelling. Restarting the cluster did not improve the situation. Now, I am completely unable to perform any DDL operations. How should I handle this situation?
Take a look at this…
I suggest checking the execution status of the DDL
Is it just this one DDL job? Use admin show ddl jobs
to check the others.
Two jobs have been in the cancelling state for a long time.
Is there a job_id 9116, and what is its status?
There is no task with jobid 9916.
Check if there is any information in the TiDB logs.
I shut down the cluster for 2 hours, and after restarting, I found that the task was already in a canceled state. It seems like the cancellation was particularly slow.
I checked all my TiDB instances and found that none of them are the DDL owner.
I restarted all the TiDB server instances, and the result of select tidb_is_owner()
for one instance became 1. The tasks in the queue were immediately completed.
This is an issue closely related to the owner. You can check the tidb.log to analyze why the owner cannot be selected. Temporarily marking it as resolved.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.