How to Restart a TiDB Instance Without Creating Indexes

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

Original topic: 如何再启动TIDB实例时,不建索引

| username: TiDBer_Terry261

[Test Environment for TiDB] Testing
[TiDB Version] 6.6.0
[Reproduction Path]
When I was creating an index, I felt the speed was too slow, so I canceled the index creation using ADMIN CANCEL DDL JOB. The JOB status also showed ROLLBACK DONE. After I restarted the cluster, all other nodes could start normally except for the TiDB node. The logs kept reporting:

JOB ID=223 is the canceled index creation task. Now I want the TiDB node to start without processing DDL-related tasks directly. How can I achieve this?
[Encountered Problem: Problem Phenomenon and Impact]
[Resource Configuration]
[Attachments: Screenshots/Logs/Monitoring]

| username: tidb菜鸟一只 | Original post link

There is a very simple method: directly scale down and then scale up again. It should definitely be gone, but theoretically, it should also be gone after a restart. Is version 6.6 different?

| username: TiDBer_Terry261 | Original post link

Already canceled, execute
When restarting the cluster, you can only start it by adding the RUN-DDL=FALSE parameter to the TIDB startup script.

| username: TiDBer_Terry261 | Original post link

Currently, none of the DDL operations can be executed.

| username: TiDBer_pkQ5q1l0 | Original post link

It should be because RUN-DDL=FALSE was added.

| username: TiDBer_Terry261 | Original post link

Yes, changing the parameter set @@global.tidb_enable_ddl=on; allows table creation, but when creating an index, the SCHEMA STATE remains in WRITE REORGANIZATION and does not change. This table has only 110,000 records, and it has been several hours without completion.

| username: knull | Original post link

I want to know if tidb_ddl_distribute_reorg is enabled?

| username: TiDBer_Terry261 | Original post link

It was open before, but now it’s closed.