【 TiDB 使用环境`】生产
【 TiDB 版本】V5.2.2
【 DM 版本】dmctl/v6.1.0
【遇到的问题】全量dump load sync上游多个分库RDS MySQL,其中一个分库的表报错
【问题现象及影响】dump阶段报错
"stage": "Paused",
"unit": "Load",
"result": {
"isCanceled": false,
"errors": [
{
"ErrCode": 24006,
"ErrClass": "checkpoint",
"ErrScope": "internal",
"ErrLevel": "medium",
"Message": "restoring count greater than total count for table[表名xxx]",
"RawCause": "",
"Workaround": ""
}
],
已对比过报错的表结构,去其他分库的表结构一致。
h5n1
(H5n1)
3
issue 里面是V2版本,我当前是V6.1.0。
relay log的配置如何查看?
h5n1
(H5n1)
5
relaylog 看配置文件里,版本不同这issue还是open的
[2022/07/05 08:33:31.332 +08:00] [ERROR] [loader.go:732] ["calc load process"] [task=task-name-xxx] [unit=load] [error="[code=24006:class=checkpoint:scope=internal:level=medium], Message: restoring count greater than to
tal count for table[table-name-xxx]"]
[2022/07/05 08:33:31.332 +08:00] [INFO] [subtask.go:315] ["unit process returned"] [subtask=task-name-xxx] [unit=Load] [stage=Paused] [status="{\"progress\":\"100.00 %\",\"metaBinlog\":\"(mysql-bin.000663, 127800)\",\"m
etaBinlogGTID\":\"033599ea-7b6d-11ec-80d9-b8599f37f088:1-21693957,584da0f6-2b37-11ec-b023-0c42a1df22b4:1-51405854,8c9840f4-ebf4-11ea-ab97-506b4bfece4c:1-130374091,b790db32-d621-11ea-87fe-00163e32315a:1-43242323,bc662633-ebf4-11ea-b98
1-506b4bfe81cc:1\"}"]
[2022/07/05 08:33:31.332 +08:00] [INFO] [loader.go:809] ["stop importing data process"] [task=task-name-xxx] [unit=load]
[2022/07/05 08:33:31.332 +08:00] [ERROR] [subtask.go:336] ["unit process error"] [subtask=task-name-xxx] [unit=Load] ["error information"="ErrCode:24006 ErrClass:\"checkpoint\" ErrScope:\"internal\" ErrLevel:\"medium\"
Message:\"restoring count greater than total count for table[table-name-xxx]\" "]
查了task和source的配置,都没有开启relay
tiup dmctl --master-addr x.x.x.x:8261 stop-task xxxxxx
Starting component `dmctl`: /root/.tiup/components/dmctl/v6.1.0/dmctl/dmctl --master-addr x.x.x.x:8261 stop-task xxxxxx
{
"op": "Delete",
"result": false,
"msg": "[code=38041:class=dm-master:scope=internal:level=medium], Message: invalid op 7 on task",
"sources": [
]
}
我不玩了,让我走好不好?
切换到 V5.3.0 dmctl之后,stop-task成功了
tiup dmctl --master-addr x.x.x.x:8261 stop-task task-xxxxx
Starting component `dmctl`: /root/.tiup/components/dmctl/v6.1.0/dmctl/dmctl --master-addr x.x.x.x:8261 stop-task task-xxxxx
{
"op": "Delete",
"result": false,
"msg": "[code=38041:class=dm-master:scope=internal:level=medium], Message: invalid op 7 on task",
"sources": [
]
}
# 此时切换至 /root/.tiup/components/dmctl/v5.3.0/dmctl
./dmctl --master-addr x.x.x.x:8261 stop-task task-xxxxx
{
"op": "Stop",
"result": true,
"msg": "",
"sources": [
{
"result": true,
"msg": "",
能提供下完整的日志吗?
invalid op 可能是因为 dmctl 和 dm 的版本不匹配导致的:dm v5.4.0执行stop-task 返回 invalid op 7 on task
可以指定一下 dmctl 的版本或者升级 dmctl (跟 dm 版本一致)
完整日志脱敏太麻烦。
dm版本如何跟dmctl保持一致,我只知道指定dmctl的版本,dm的版本号没有跟dmctl 以及TiDB保持一致,如何适配?
Min_Chen
(Make the world more reliable)
13
restoring count greater than total count for table 的报错看下原始文件中字符串数据中是否有转义字符,可能是转义字符把一行数据分为两行甚至多行。
DM 自 5.4 及以后,版本号随 tidb release 版本号变更,参考 https://docs.pingcap.com/zh/tidb-data-migration/v5.3/5.3.0#特别说明
system
(system)
关闭
14
该主题在最后一个回复创建后60天后自动关闭。不再允许新的回复。