mysql> use tpcc_test;
Database changed
mysql> select count(0) from customer;
+----------+
| count(0) |
+----------+
| 3000000 |
+----------+
1 row in set (0.88 sec)
mysql> set global tidb_ddl_reorg_worker_cnt=4;
Query OK, 0 rows affected (0.02 sec)
mysql> show variables like 'tidb_ddl_%';
+--------------------------------+--------------+
| Variable_name | Value |
+--------------------------------+--------------+
| tidb_ddl_disk_quota | 107374182400 |
| tidb_ddl_enable_fast_reorg | ON |
| tidb_ddl_error_count_limit | 512 |
| tidb_ddl_flashback_concurrency | 64 |
| tidb_ddl_reorg_batch_size | 256 |
| tidb_ddl_reorg_priority | PRIORITY_LOW |
| tidb_ddl_reorg_worker_cnt | 4 |
+--------------------------------+--------------+
7 rows in set (0.00 sec)
mysql> alter table customer add index idx_01(c_city);
Query OK, 0 rows affected (11.13 sec)
我试了下,没有复现,不过我的tidb-server给的资源比较足,数据量也是少了一个数量级。