Table cannot be deleted, any DDL queued is unresponsive

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 表无法删除任何DDL排队中无响应

| username: ShawU

[TiDB Usage Environment] Production Environment
[TiDB Version] 6.2
[Encountered Problem] Unable to perform any DDL operations on the table, tasks are queued
[Reproduction Path] Possible cause: During large-scale data synchronization, TiDB Node’s CPU was overloaded and interrupted abnormally
[Problem Phenomenon and Impact]
Phenomenon: The table is stuck at drop index and cannot perform any DDL operations. Executing ADMIN CANCEL DDL JOBS results in a lot of errors: [ddl:8226] This job is almost finished, can’t be cancelled now, and it cannot be cancelled.
Impact: This table has become a dead table and cannot be deleted or rebuilt.

[Attachments]


| username: TiDBer_CEVsub | Original post link

When performing large-scale data synchronization, it is best to set a limit, otherwise, inexplicable issues may arise.

| username: ShawU | Original post link

The current issue is figuring out how to drop this table.

| username: WalterWj | Original post link

Try restarting the tidb-server.

| username: tidb狂热爱好者 | Original post link

Just wait for the DDL to finish. I have already answered your question in the WeChat group. Use an SSD hard drive, don’t use a virtual machine, use a physical machine.

| username: alfred | Original post link

Are there any error logs? It seems like it only restarted.

| username: ShawU | Original post link

Restarting won’t work; it doesn’t affect the DDL queue.

| username: ShawU | Original post link

It just doesn’t end. It’s also impossible to rename or delete the table. It’s not related to the machine; this is still a bug.

| username: h5n1 | Original post link

Start canceling from the job with the largest ID. The drop index and create index are for the same table, right?

| username: ShawU | Original post link

Yes. I just want to know how to delete this table from the TiKV and TiDB layers now.

| username: TiDBer_wTKU9jv6 | Original post link

Recently encountered the same issue.
Version: v6.5.0.
Actions taken that did not resolve the issue: Restarted the entire cluster, admin cancel ddl jobs, individually restarted all TiDB, individually restarted PD, individually restarted TiKV.
Action taken that resolved the issue: Stopped all TiDB, started one TiDB, and then it returned to normal.
How did the original poster solve it?

| username: xmlianfeng | Original post link

6.5.3 According to your method, I didn’t succeed. Are there any other tips in the forum?

| username: redgame | Original post link

Restart.

| username: kkpeter | Original post link

I am using version 6.5.1 and experiencing the same issue. I don’t know what to do anymore; I’ve restarted everything, but it didn’t help.

| username: kkpeter | Original post link

The DDL job is stuck in rolling back and there is no progress.

| username: kkpeter | Original post link

Using your method, it was restored. Stop all TiDB nodes, wait for 1 minute, and start one node.

| username: 天蓝色的小九 | Original post link

Learned.