为提高效率,请提供以下信息,问题描述清晰能够更快得到解决:
【概述】 场景 + 问题概述 使用DM2.0同步至TIDB5.0.1 非主键冲突 时不时出现10006 Error 1062: Duplicate entry ‘1000012001–1’ for key ‘PRIMARY’ 执行 resume-task lh-2001
后恢复正常同步
【备份和数据迁移策略逻辑】 enable-gtid: false task-mode: all
【背景】 做过哪些操作
【现象】 业务和数据库现象
随机的出现如下错误 执行resum-task后恢复
【问题】 当前遇到的问题
Starting component dmctl
: /home/tidbuser/.tiup/components/dmctl/v2.0.3/dmctl/dmctl --master-addr 172.16.7.121:8261 query-status lh-2001
{
“result”: true,
“msg”: “”,
“sources”: [
{
“result”: true,
“msg”: “”,
“sourceStatus”: {
“source”: “replica-1000012001”,
“worker”: “dm-172.16.7.121-8262”,
“result”: null,
“relayStatus”: null
},
“subTaskStatus”: [
{
“name”: “lh-2001”,
“stage”: “Paused”,
“unit”: “Sync”,
“result”: {
“isCanceled”: false,
“errors”: [
{
“ErrCode”: 10006,
“ErrClass”: “database”,
“ErrScope”: “not-set”,
“ErrLevel”: “high”,
“Message”: “startLocation: [position: (, 0), gtid-set: ], endLocation: [position: (mysql-bin.000006, 628723458), gtid-set: ]: execute statement failed: commit”,
“RawCause”: “Error 1062: Duplicate entry ‘1000012001–1’ for key ‘PRIMARY’”,
“Workaround”: “”
}
],
“detail”: null
},
“unresolvedDDLLockID”: “”,
“sync”: {
“totalEvents”: “13069961”,
“totalTps”: “1980”,
“recentTps”: “0”,
“masterBinlog”: “(mysql-bin.000006, 636009217)”,
“masterBinlogGtid”: “”,
“syncerBinlog”: “(mysql-bin.000006, 628723157)”,
“syncerBinlogGtid”: “”,
“blockingDDLs”: [
],
“unresolvedGroups”: [
],
“synced”: false,
“binlogType”: “remote”
}
}
]
}
]
}
【业务影响】
【TiDB 版本】 MYSQL 5.7.31 TIDB 5.0.1 DM 2.0.3
【附件】
- 相关日志、配置文件、Grafana 监控(https://metricstool.pingcap.com/)
- TiUP Cluster Display 信息
- TiUP CLuster Edit config 信息
- TiDB-Overview 监控
- 对应模块的 Grafana 监控(如有 BR、TiDB-binlog、TiCDC 等)
- 对应模块日志(包含问题前后 1 小时日志)
若提问为性能优化、故障排查类问题,请下载脚本运行。终端输出的打印结果,请务必全选并复制粘贴上传。