DM迁移遇到大事务

为提高效率,请提供以下信息,问题描述清晰能够更快得到解决:

【TiDB 版本】
TiDB version: v4.0.11
DM version: v2.0.1
【问题描述】
使用DM从mysql全量+增量同步数据,dump,load阶段完成了。在增量同步sync阶段,遇到了单行记录大小超过120MB的,导致增量同步卡住进入paused阶段。

 {
    "result": true,
    "msg": "",
    "sources": [
        {
            "result": true,
            "msg": "",
            "sourceStatus": {
                "source": "mysql-cat",
                "worker": "dm-10.210.84.234-8262",
                "result": null,
                "relayStatus": null
            },
            "subTaskStatus": [
                {
                    "name": "sync-cat",
                    "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.000179, 411676340), gtid-set: ]: execute statement failed: REPLACE INTO `cat`.`monthly_report_content` (`report_id`,`content`,`period`,`creation_date`) VALUES (?,?,?,?)",
                                "RawCause": "Error 8025: entry too large, the max entry size is 125829120, the size of data is 134046901",
                                "Workaround": ""
                            }
                        ],
                        "detail": null
                    },
                    "unresolvedDDLLockID": "",
                    "sync": {
                        "totalEvents": "4438043",
                        "totalTps": "73967",
                        "recentTps": "0",
                        "masterBinlog": "(mysql-bin.000378, 369679415)",
                        "masterBinlogGtid": "",
                        "syncerBinlog": "(mysql-bin.000178, 392436138)",
                        "syncerBinlogGtid": "",
                        "blockingDDLs": [
                        ],
                        "unresolvedGroups": [
                        ],
                        "synced": false,
                        "binlogType": "remote"
                    }
                }
            ]
        }
    ]
}

请问:DM可以跳过这种大事务同步的单行记录吗,或者有其它方法让增量同步继续吗?

若提问为性能优化、故障排查类问题,请下载脚本运行。终端输出的打印结果,请务必全选并复制粘贴上传。

参考这个 TIDB DM 不能跳过 上游定时EVENT 任务

1 个赞

我查看了下文档,是可以通过handle-error的skip跳过指定位置的binlog-pos,指令如下
tiup dmctl --master-addr ip:port handle-error sync-cat -b "mysql-bin.000178:392436138" skip

handle-error 是跳过 ddl 的,你上面的报错是 dml 语句,不能用的。

是哦,难到单行记录超限,只能忽略这张表,不可以跳过这条记录吗?

此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。