【 TiDB 使用环境】测试
【 TiDB 版本】 V8.1.0
【复现路径】
0.tidb集群各节点状态正常,且分区相关参数使用的为默认参数,未做调整
- 在mysql8.0.23版本作为源端,新建测试库后新增一个LIST分区表
- 使用dm进行迁移任务创建并运行(全量+增量)
- 在mysql源端操作分区删除: ALTER TABLE
topic_stats
DROP PARTITIONp20240616
;
【遇到的问题:问题现象及影响】
dm的任务sync阶段出现异常,具体信息如下:
(使用了binlog-schema获取结构信息且同时对比了mysql与tidb,三方分区表结构均一致)
{
“result”: true,
“msg”: “”,
“sources”: [
{
“result”: true,
“msg”: “”,
“sourceStatus”: {
“source”: “172.16.73.121_3306”,
“worker”: “dm-172.16.73.129-8262”,
“result”: null,
“relayStatus”: null
},
“subTaskStatus”: [
{
“name”: “dba”,
“stage”: “Paused”,
“unit”: “Sync”,
“result”: {
“isCanceled”: false,
“errors”: [
{
“ErrCode”: 44006,
“ErrClass”: “schema-tracker”,
“ErrScope”: “internal”,
“ErrLevel”: “high”,
“Message”: “startLocation: [position: (mysql-bin.000045, 66147), gtid-set: 346d370c-fe81-11ec-9fbc-00155dc00e11:1-176945,3c6c4d95-c173-11ed-a641-00155d247741:1-6], endLocation: [position: (mysql-bin.000045, 66295), gtid-set: 346d370c-fe81-11ec-9fbc-00155dc00e11:1-176946,3c6c4d95-c173-11ed-a641-00155d247741:1-6], origin SQL: [ALTER TABLE topic_stats
DROP PARTITION p20240616
]: cannot track DDL: ALTER TABLE dba_part
.topic_stats
DROP PARTITION p20240616
”,
“RawCause”: “[ddl:1505]Partition management on a not partitioned table is not possible”,
“Workaround”: “You can use handle-error to replace or skip this DDL.”
}
],
“detail”: null
},
“unresolvedDDLLockID”: “”,
“sync”: {
“totalEvents”: “15”,
“totalTps”: “0”,
“recentTps”: “0”,
“masterBinlog”: “(mysql-bin.000045, 66648)”,
“masterBinlogGtid”: “346d370c-fe81-11ec-9fbc-00155dc00e11:1-176947,3c6c4d95-c173-11ed-a641-00155d247741:1-6”,
“syncerBinlog”: “(mysql-bin.000045, 66070)”,
“syncerBinlogGtid”: “346d370c-fe81-11ec-9fbc-00155dc00e11:1-176945,3c6c4d95-c173-11ed-a641-00155d247741:1-6”,
“blockingDDLs”: [
],
“unresolvedGroups”: [
{
“target”: “dba_part
.topic_stats
”,
“DDLs”: [
“ALTER TABLE dba_part
.topic_stats
DROP PARTITION p20240616
”
],
“firstLocation”: “position: (mysql-bin.000045, 66147), gtid-set: 346d370c-fe81-11ec-9fbc-00155dc00e11:1-176945,3c6c4d95-c173-11ed-a641-00155d247741:1-6”,
“synced”: [
“dba_part
.topic_stats
”
],
“unsynced”: [
]
}
],
“synced”: false,
“binlogType”: “remote”,
“secondsBehindMaster”: “0”,
“blockDDLOwner”: “”,
“conflictMsg”: “”,
“totalRows”: “15”,
“totalRps”: “0”,
“recentRps”: “0”
},
“validation”: null
}
]
}
]
}
烦请各位大佬帮忙看下,多谢多谢