A large number of errors reported in the logs: handle DDL event failed

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

Original topic: 日志大量报错handle ddl event failed

| username: Jolyne

【TiDB Usage Environment】Production Environment / Testing / PoC
【TiDB Version】
【Reproduction Path】What operations were performed when the issue occurred
The monitoring shows a large number of handle ddl event failed errors, and they are all truncate operations, but manually executing truncate on these tables is successful.
【Encountered Issue: Issue Phenomenon and Impact】
【Resource Configuration】Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
【Attachments: Screenshots/Logs/Monitoring】

| username: h5n1 | Original post link

It is speculated that it should be a bug similar to the one below. When truncating, some information cleanup was not considered, resulting in corresponding records already existing in stats_meta when regenerating the table.

| username: Jolyne | Original post link

It’s somewhat similar. I haven’t seen this issue mentioned in version 7, so I’m not sure if it’s a new bug.

| username: redgame | Original post link

It’s that bug.

| username: zhanggame1 | Original post link

I have also seen this. If you frequently truncate, drop, and then recreate tables, these errors will occur.