【 TiDB 使用环境】生产环境 /测试/ Poc
【 TiDB 版本】
V6.5.5
【复现路径】做过哪些操作出现的问题
【遇到的问题:问题现象及影响】
1、drop一张表卡住
2、ADMIN SHOW DDL;有一条卡住很久ddl sql(看到是2条,先add index running、后drop table)
|404 | 2be432ce-525a-49df-8e46-f53c1f10888d |xx:4000 |
ID:528, Type:drop table, State:queueing, SchemaState:public, SchemaID:90, TableID:444, RowCount:0, ArgLen:0, start time: 2024-03-06 16:29:56.586 +0800 CST, Err:<nil>, ErrCount:0, SnapshotVersion:0
ID:526, Type:add index, State:running, SchemaState:write reorganization, SchemaID:90, TableID:444, RowCount:0, ArgLen:0, start time: 2024-03-06 16:12:13.186 +0800 CST, Err:<nil>, ErrCount:0, SnapshotVersion:448193549109821543, UniqueWarnings:0
| 3841a51f-6760-4dc0-a260-8ce125d06f6f
| DROP TABLE IF EXISTS `table_name`
/* ApplicationName=DataGrip 2023.3.4 */ CREATE INDEX xx ON table_name (xx, xx)
3、ADMIN SHOW DDL JOBS;报错
ERROR 1105 (HY000): tikv aborts txn: Error(InvalidKeyRangeMode { cmd: scan, storage_api_version: V2, range: (Some("6D44444C4A6F6248FF69FF73746F727900FF0000FC0000000000FF0000690000000000FA"), None) })
4、tidb所有日志找这张表相关job id 取消job
ADMIN CANCEL DDL JOBS 521,522,523,524,525,526,528,529,533,534,535,536,537,538,541,542,543;
±-------±---------------------------------------+
| JOB_ID | RESULT |
±-------±---------------------------------------+
| 521 | error: [ddl:8224]DDL Job:521 not found |
| 522 | error: [ddl:8224]DDL Job:522 not found |
| 523 | error: [ddl:8224]DDL Job:523 not found |
| 524 | error: [ddl:8224]DDL Job:524 not found |
| 525 | error: [ddl:8224]DDL Job:525 not found |
| 526 | successful |
| 528 | successful |
| 529 | successful |
| 533 | successful |
| 534 | successful |
| 535 | successful |
| 536 | successful |
| 537 | successful |
| 538 | successful |
| 541 | successful |
| 542 | successful |
| 543 | successful |
±-------±---------------------------------------+
ps:之前没注意是2个job,取消了drop table的dll job,卡住的add index还是running,rename卡住
5、上面所有job取消后,继续rename这张表,大概8分钟后成功
求助问题:
1、想知道add index 就2条数据为啥卡住了
2、ADMIN SHOW DDL JOBS是不是因为storage_api_version v2的原因,可以回退吗
【资源配置】进入到 TiDB Dashboard -集群信息 (Cluster Info) -主机(Hosts) 截图此页面
【附件:截图/日志/监控】