dm2中handle-error不成功

» handle-error gamelab01-task01 skip
{
    "result": true,
    "msg": "",
    "sources": [
        {
            "result": false,
            "msg": "only support to handle ddl error currently, see https://docs.pingcap.com/tidb-data-migration/stable/error-handling for other errors",
            "source": "gamelab01",
            "worker": ""
        }
    ]
}
» query-status gamelab01-task01
{
    "result": true,
    "msg": "",
    "sources": [
        {
            "result": true,
            "msg": "",
            "sourceStatus": {
                "source": "gamelab01",
                "worker": "worker2",
                "result": null,
                "relayStatus": null
            },
            "subTaskStatus": [
                {
                    "name": "gamelab01-task01",
                    "stage": "Paused",
                    "unit": "Sync",
                    "result": {
                        "isCanceled": false,
                        "errors": [
                            {
                                "ErrCode": 36027,
                                "ErrClass": "sync-unit",
                                "ErrScope": "internal",
                                "ErrLevel": "high",
                                "Message": "startLocation: [position: (, 0), gtid-set: ], endLocation: [position: (mysql-bin.000009, 299325872), gtid-set: 915a5f85-8fd9-4820-b112-2d296273ece1:1-806943,9c656ea1-9999-11ea-9641-74867af4110d:1]: gen update sqls failed, schema: gamelab, table: admin_users: Column count doesn't match value count: 11 (columns) vs 13 (values)",
                                "RawCause": "",
                                "Workaround": "Please check the log files to see if a related DDL has been skipped, and you could use `operate-schema` to get and set the table structure."
                            }
                        ],
                        "detail": null
                    },
                    "unresolvedDDLLockID": "",
                    "sync": {
                        "totalEvents": "4",
                        "totalTps": "0",
                        "recentTps": "0",
                        "masterBinlog": "(mysql-bin.000009, 299458486)",
                        "masterBinlogGtid": "915a5f85-8fd9-4820-b112-2d296273ece1:1-807205,9c656ea1-9999-11ea-9641-74867af4110d:1",
                        "syncerBinlog": "(mysql-bin.000009, 299316512)",
                        "syncerBinlogGtid": "915a5f85-8fd9-4820-b112-2d296273ece1:1-806919,9c656ea1-9999-11ea-9641-74867af4110d:1",
                        "blockingDDLs": [
                        ],
                        "unresolvedGroups": [
                            {
                                "target": "`gamelab`.`g_invite_codes`",
                                "DDLs": [
                                    "CREATE INDEX `idx_appid_code` ON `gamelab`.`g_invite_codes` (`app_id`, `code`) USING BTREE"
                                ],
                                "firstLocation": "position: (mysql-bin.000009, 299316512), gtid-set: 915a5f85-8fd9-4820-b112-2d296273ece1:1-806919,9c656ea1-9999-11ea-9641-74867af4110d:1",
                                "synced": [
                                    "`gamelab`.`g_invite_codes`"
                                ],
                                "unsynced": [
                                    "`gamelab`.`g_invite_codes_1102`"
                                ]
                            }
                        ],
                        "synced": false,
                        "binlogType": "remote"
                    }
                }
            ]
        }
    ]
}

看下对应的binlog,是否有不兼容的ddl

CREATE INDEX idx_appid_code ON g_invite_codes(app_id, code) USING BTREE ;

这种不兼容?

如果不兼容,要怎么跳过错误?

报错之后,我对g_invite_codes_1102表也创建了索引,但还是解决不了问题,不知道为什么

如果已经在下游手动执行过这个ddl,keyi 尝试使用这个文档命令跳过错误
https://docs.pingcap.com/zh/tidb-data-migration/stable/handle-failed-ddl-statements/#handle-error

已经执行了handle-error skip,但是报错如下:

» handle-error gamelab01-task01 skip
{
    "result": true,
    "msg": "",
    "sources": [
        {
            "result": false,
            "msg": "only support to handle ddl error currently, see https://docs.pingcap.com/tidb-data-migration/stable/error-handling for other errors",
            "source": "gamelab01",
            "worker": ""
        }
    ]
}

报错显示,你这不是ddl的错误

需要怎么解决?

尝试重置任务试一下

重启都不行

你要把元信息都清理。

在task.yml文件中添加忽略create index事件,改为手动从tidb添加索引,解决了这个问题

一、停止任务:

>>stop-task gamelab01-task01

二、添加忽略事件:

filters:
    filter01:
        schema-pattern: "gamelab"
        events: ["create index"]
        action: Ignore

三、重新开启任务

>>start-task gamelab01-task01.yml

四、在tidb执行create index操作

:ok_hand:

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