8211 - DDL Job Rollback, Error Message: Reorg Worker Panic

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

Original topic: 8211 - DDL job rollback, error msg: Reorg worker panic

| username: wluckdog

Bug Report
Clearly and accurately describe the issue you found. Providing any steps to reproduce the issue can help the development team address it promptly.
[TiDB Version] tidb 6.5
[Impact of the Bug]

Failed to create index
8211 - DDL job rollback, error msg: Reorg worker panic
[Possible Steps to Reproduce the Issue]

  1. Index creation fails for only one table, while creating an index on a newly created table in the database works fine.

SELECT * FROM mysql.tidb_mdl_view This view has an update statement blocking the create index statement, but after stopping the update consumption task and recreating the index, this view no longer shows blocking statements, yet the index creation still fails.

[Observed Unexpected Behavior]

[Expected Behavior]

[Related Components and Specific Versions]

[Other Background Information or Screenshots]
Such as cluster topology, system and kernel version, application app information, etc.; if the issue is related to SQL, please provide the SQL statements and related table schema information; if there are critical errors in the node logs, please provide the relevant node log content or files; if some business-sensitive information is inconvenient to provide, please leave your contact information, and we will communicate with you privately.

| username: 小龙虾爱大龙虾 | Original post link

This doesn’t seem to be a bug. I don’t see any issues.

| username: 啦啦啦啦啦 | Original post link

Could it be a transaction conflict when backfilling index data? Try reducing tidb_ddl_reorg_batch_size or doing it during off-peak hours.

| username: xfworld | Original post link

Reorg worker panic, data backfill failed.

  1. Publish your cluster configuration.
  2. Describe the corresponding structure and data scale of the operation.
  3. It is recommended to upgrade to the latest version 6.5.X.
| username: wluckdog | Original post link

The data has been backfilled. During the merge phase, DDL is normal and does not conflict with DML. tidb_ddl_reorg_batch_size=500

| username: Billmay表妹 | Original post link

You can try the following steps:

  1. Ensure that the TiDB version is up to date and that the latest patches and updates have been applied. Sometimes, this issue may be caused by known bugs, and the latest version may have already fixed the problem. You can try upgrading to v6.5.6.
  2. Check the blocking statements in the mysql.tidb_mdl_view view and ensure they do not interfere with the index rebuild operation. You can use the SHOW PROCESSLIST command to view the currently running statements and try to stop or optimize the statements that may cause blocking.
  3. If the problem persists, you can try restarting the TiDB cluster and re-executing the index creation operation. This helps clear any temporary states or anomalies that may exist.
| username: dba远航 | Original post link

In our actual migration tests, the same issue occurred with the MySQL version of the database. Deleting the original table and recreating it resolved the problem. This should be an anomaly on the TiDB side.

| username: wluckdog | Original post link

We disabled the features in version 6.5, and the issue was resolved:
tidb_enable_metadata_lock = off
tidb_ddl_enable_fast_reorg = off

| username: h5n1 | Original post link

Is it a regular index or a unique index?

| username: tangenta | Original post link

The Reorg worker panic should be a bug. Could you please provide the DDL owner’s logs for this time period?

| username: wluckdog | Original post link

Ordinary index

| username: wluckdog | Original post link