依然跳过不了
{
"op": "Resume",
"result": true,
"msg": "",
"workers": [
{
"meta": {
"result": true,
"worker": "127.0.0.1:8262",
"msg": ""
},
"op": "Resume",
"logID": "11"
}
]
}
» query-status testx
{
"result": true,
"msg": "",
"workers": [
{
"result": true,
"worker": "127.0.0.1:8262",
"msg": "",
"subTaskStatus": [
{
"name": "testx",
"stage": "Paused",
"unit": "Sync",
"result": {
"isCanceled": false,
"errors": [
{
"Type": "UnknownError",
"msg": "",
"error": {
"ErrCode": 11006,
"ErrClass": 2,
"ErrScope": 3,
"ErrLevel": 3,
"Message": "current pos (mysql-bin|000001.000012, 53304437): encountered incompatible DDL in TiDB:\
\tplease confirm your DDL statement is correct and needed.\
\tfor TiDB compatible DDL, please see the docs:\
\t English version: https://pingcap.com/docs/dev/reference/mysql-compatibility/#ddl\
\t Chinese version: https://pingcap.com/docs-cn/dev/reference/mysql-compatibility/#ddl\
\tif the DDL is not needed, you can use a filter rule with \"*\" schema-pattern to ignore it.\
\t : parse statement: [parser:1115]Unknown character set: 'utf32'%!!(MISSING)(EXTRA string=ALTER TABLE `fsk_erp_trade`.`et_device_order_round` \r\
MODIFY COLUMN `id` varchar(50) CHARACTER SET utf32 NOT NULL COMMENT '主键' FIRST,\r\
MODIFY COLUMN `round_detail` varchar(1000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '查房详情' AFTER `round_type`)",
"RawCause": "[parser:1115]Unknown character set: 'utf32'"
}
}
],
"detail": null
},
"unresolvedDDLLockID": "",
"sync": {
"totalEvents": "30785",
"totalTps": "11",
"recentTps": "1",
"masterBinlog": "(mysql-bin.000012, 54790690)",
"masterBinlogGtid": "08e024dd-22db-11ea-837a-00163e04dda5:1-3918708",
"syncerBinlog": "(mysql-bin|000001.000012, 53304003)",
"syncerBinlogGtid": "",
"blockingDDLs": [
],
"unresolvedGroups": [
],
"synced": false
}
}
],
"relayStatus": {
"masterBinlog": "(mysql-bin.000012, 54790690)",
"masterBinlogGtid": "08e024dd-22db-11ea-837a-00163e04dda5:1-3918708",
"relaySubDir": "0652de9c-ddd6-11e9-8f03-00163e00241b.000001",
"relayBinlog": "(mysql-bin.000012, 54790690)",
"relayBinlogGtid": "",
"relayCatchUpMaster": true,
"stage": "Running",
"result": null
},
"sourceID": "mysql-replica-01"
}
]
}
难道是 pos 用错了?这类数据库编码错误类的,也只有个别库需要一次性处理。这类无法预知。
尝试使用一下代码跳过:
sql-skip -w 127.0.0.1:8262 --binlog-pos=mysql-bin|000001.000012:53304437 testx
resume-task testx
master log
[2020/07/13 18:16:14.083 +08:00] [INFO] [server.go:738] ["task name"=testx] [payload="name:\"testx\" binlogPos:\"mysql-bin|000001.000012:53304437\" worker:\"127.0.0.1:8262\" "] [request=HandleSQLs]
[2020/07/13 18:16:16.633 +08:00] [INFO] [server.go:323] [payload="op:Resume name:\"testx\" "] [request=OperateTask]
[2020/07/13 18:16:16.634 +08:00] [INFO] [server.go:1913] ["wait op log result"] [task=testx] [worker=127.0.0.1:8262] ["operation log ID"=15] [result="meta:<result:true > log:<id:15 task:<op:Resume name:\"testx\" > ts:1594635376633535417 > "]
worker log
[2020/07/13 18:16:07.407 +08:00] [WARN] [task_checker.go:358] ["backoff skip auto resume task"] [component="task checker"] [task=testx] [latestResumeTime=2020/07/13 18:14:02.407 +08:00] [duration=5m0s]
[2020/07/13 18:16:12.407 +08:00] [WARN] [task_checker.go:358] ["backoff skip auto resume task"] [component="task checker"] [task=testx] [latestResumeTime=2020/07/13 18:14:02.407 +08:00] [duration=5m0s]
[2020/07/13 18:16:14.083 +08:00] [INFO] [server.go:346] [request=HandleSQLs] [payload="name:\"testx\" binlogPos:\"mysql-bin|000001.000012:53304437\" "]
[2020/07/13 18:16:14.083 +08:00] [WARN] [operator.go:133] ["overwrite operator"] [task=testx] [unit="binlog replication"] ["old operator"="uuid: 7b675dad-5116-467f-869a-022d1d94ca50, pos: (mysql-bin|000001.000012, 53304437), op: SKIP, args: "] ["new operator"="uuid: 5028d478-c40f-406b-8a20-65b23700b29c, pos: (mysql-bin|000001.000012, 53304437), op: SKIP, args: "]
[2020/07/13 18:16:14.083 +08:00] [INFO] [operator.go:136] ["set a new operator"] [task=testx] [unit="binlog replication"] ["new operator"="uuid: 5028d478-c40f-406b-8a20-65b23700b29c, pos: (mysql-bin|000001.000012, 53304437), op: SKIP, args: "]
[2020/07/13 18:16:16.633 +08:00] [INFO] [server.go:181] [request=OperateSubTask] [payload="op:Resume name:\"testx\" "]
[2020/07/13 18:16:16.633 +08:00] [INFO] [worker.go:320] ["operate subtask"] [component="worker controller"] [operation=Resume] [task=testx]
[2020/07/13 18:16:16.633 +08:00] [INFO] [server.go:229] [request=QueryTaskOperation] [payload="name:\"testx\" logID:15 "]
[2020/07/13 18:16:17.407 +08:00] [WARN] [task_checker.go:358] ["backoff skip auto resume task"] [component="task checker"] [task=testx] [latestResumeTime=2020/07/13 18:14:02.407 +08:00] [duration=5m0s]
[2020/07/13 18:16:17.407 +08:00] [INFO] [worker.go:802] ["start to execute operation"] [component="worker controller"] [oplog="{\"id\":15,\"task\":{\"op\":3,\"name\":\"testx\"},\"ts\":1594635376633535417}"]
[2020/07/13 18:16:17.407 +08:00] [INFO] [worker.go:881] ["resume sub task"] [component="worker controller"] [task=testx]
[2020/07/13 18:16:17.407 +08:00] [INFO] [subtask.go:660] ["wait condition between two units"] [subtask=testx] ["previous unit"=Load] [unit=Sync]
[2020/07/13 18:16:17.409 +08:00] [INFO] [subtask.go:690] ["relay binlog pos catchup loader end binlog pos"] [subtask=testx]
[2020/07/13 18:16:17.409 +08:00] [INFO] [subtask.go:467] ["resume with unit"] [subtask=testx] [unit=Sync]
[2020/07/13 18:16:17.409 +08:00] [INFO] [worker.go:893] ["end to execute operation"] [component="worker controller"] ["oplog ID"=15] []
[2020/07/13 18:16:17.438 +08:00] [INFO] [relay.go:568] ["flush meta finished"] [component="relay log"] [meta="master-uuid = 0652de9c-ddd6-11e9-8f03-00163e00241b.000001, relay-binlog = (mysql-bin.000012, 56003922), relay-binlog-gtid = "]
[2020/07/13 18:16:17.449 +08:00] [INFO] [syncer.go:1093] ["replicate binlog from checkpoint"] [task=testx] [unit="binlog replication"] [checkpoint="(mysql-bin|000001.000012, 53304003)"]
[2020/07/13 18:16:17.450 +08:00] [INFO] [reader.go:402] ["update relay UUIDs"] [task=testx] [unit="binlog replication"] [component="binlog reader"] ["old uuids"="[]"] [uuids="[0652de9c-ddd6-11e9-8f03-00163e00241b.000001]"]
[2020/07/13 18:16:17.450 +08:00] [INFO] [reader.go:95] ["start to check relay log file"] [task=testx] [unit="binlog replication"] [component="binlog reader"] [path=relay_log/0652de9c-ddd6-11e9-8f03-00163e00241b.000001/mysql-bin.000012] [position="(mysql-bin.000012, 53304003)"]
[2020/07/13 18:16:17.450 +08:00] [INFO] [mode.go:99] ["change count"] [task=testx] [unit="binlog replication"] ["previous count"=0] ["new count"=0]
[2020/07/13 18:16:17.450 +08:00] [INFO] [mode.go:99] ["change count"] [task=testx] [unit="binlog replication"] ["previous count"=0] ["new count"=1]
[2020/07/13 18:16:17.450 +08:00] [INFO] [reader.go:134] ["start reading"] [task=testx] [unit="binlog replication"] [component="binlog reader"] [position="(mysql-bin|000001.000012, 53304003)"]
[2020/07/13 18:16:17.450 +08:00] [INFO] [reader.go:197] ["start to parse relay log files in sub directory"] [task=testx] [unit="binlog replication"] [component="binlog reader"] [directory=relay_log/0652de9c-ddd6-11e9-8f03-00163e00241b.000001] [position="(mysql-bin.000012, 53304003)"]
[2020/07/13 18:16:17.450 +08:00] [INFO] [reader.go:320] ["rotate binlog"] [task=testx] [unit="binlog replication"] [component="binlog reader"] [position="(mysql-bin|000001.000012, 53304003)"]
[2020/07/13 18:16:17.450 +08:00] [INFO] [reader.go:346] ["start parse relay log file"] [task=testx] [unit="binlog replication"] [component="binlog reader"] [file=relay_log/0652de9c-ddd6-11e9-8f03-00163e00241b.000001/mysql-bin.000012] [offset=53304003]
[2020/07/13 18:16:17.450 +08:00] [INFO] [syncer.go:1417] [task=testx] [unit="binlog replication"] [event=rotate] [position="(mysql-bin|000001.000012, 53304003)"]
[2020/07/13 18:16:17.450 +08:00] [ERROR] [common.go:35] ["parse statement"] [sql="ALTER TABLE `fsk_erp_trade`.`et_device_order_round` \r\
MODIFY COLUMN `id` varchar(50) CHARACTER SET utf32 NOT NULL COMMENT '主键' FIRST,\r\
MODIFY COLUMN `round_detail` varchar(1000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '查房详情' AFTER `round_type`"] [error="[parser:1115]Unknown character set: 'utf32'"]
[2020/07/13 18:16:17.450 +08:00] [ERROR] [ddl.go:71] ["encountered incompatible DDL in TiDB:\
\tplease confirm your DDL statement is correct and needed.\
\tfor TiDB compatible DDL, please see the docs:\
\t English version: https://pingcap.com/docs/dev/reference/mysql-compatibility/#ddl\
\t Chinese version: https://pingcap.com/docs-cn/dev/reference/mysql-compatibility/#ddl\
\tif the DDL is not needed, you can use a filter rule with \"*\" schema-pattern to ignore it.\
\t "] [task=testx] [unit="binlog replication"] [sql="ALTER TABLE `fsk_erp_trade`.`et_device_order_round` \r\
MODIFY COLUMN `id` varchar(50) CHARACTER SET utf32 NOT NULL COMMENT '主键' FIRST,\r\
MODIFY COLUMN `round_detail` varchar(1000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '查房详情' AFTER `round_type`"]
[2020/07/13 18:16:17.451 +08:00] [ERROR] [syncer.go:1585] ["fail to parse statement"] [task=testx] [unit="binlog replication"] [event=query] [statement="ALTER TABLE `fsk_erp_trade`.`et_device_order_round` \r\
MODIFY COLUMN `id` varchar(50) CHARACTER SET utf32 NOT NULL COMMENT '主键' FIRST,\r\
MODIFY COLUMN `round_detail` varchar(1000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '查房详情' AFTER `round_type`"] [schema=fsk_erp_trade] ["last position"="(mysql-bin|000001.000012, 53304003)"] [position="(mysql-bin|000001.000012, 53304437)"] ["gtid set"=NULL] [error="[code=11006:class=functional:scope=internal:level=high] encountered incompatible DDL in TiDB:\
\tplease confirm your DDL statement is correct and needed.\
\tfor TiDB compatible DDL, please see the docs:\
\t English version: https://pingcap.com/docs/dev/reference/mysql-compatibility/#ddl\
\t Chinese version: https://pingcap.com/docs-cn/dev/reference/mysql-compatibility/#ddl\
\tif the DDL is not needed, you can use a filter rule with \"*\" schema-pattern to ignore it.\
\t : parse statement: [parser:1115]Unknown character set: 'utf32'%!(EXTRA string=ALTER TABLE `fsk_erp_trade`.`et_device_order_round` \r\
MODIFY COLUMN `id` varchar(50) CHARACTER SET utf32 NOT NULL COMMENT '主键' FIRST,\r\
MODIFY COLUMN `round_detail` varchar(1000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '查房详情' AFTER `round_type`)"]
[2020/07/13 18:16:17.451 +08:00] [INFO] [syncer.go:887] ["flushed checkpoint"] [task=testx] [unit="binlog replication"] [checkpoint="(mysql-bin|000001.000012, 53304003)(flushed (mysql-bin|000001.000012, 53304003))"]
[2020/07/13 18:16:17.451 +08:00] [INFO] [relay.go:113] ["current earliest active relay log"] [task=testx] [unit="binlog replication"] ["active relay log"=0652de9c-ddd6-11e9-8f03-00163e00241b.000001/mysql-bin.000012]
[2020/07/13 18:16:17.451 +08:00] [INFO] [mode.go:99] ["change count"] [task=testx] [unit="binlog replication"] ["previous count"=1] ["new count"=0]
[2020/07/13 18:16:17.451 +08:00] [INFO] [syncer.go:2032] ["print status routine exits"] [task=testx] [unit="binlog replication"] [error="context canceled"]
[2020/07/13 18:16:17.451 +08:00] [INFO] [reader.go:408] ["binlog reader closing"] [task=testx] [unit="binlog replication"] [component="binlog reader"]
[2020/07/13 18:16:17.451 +08:00] [WARN] [reader.go:137] ["parse relay finished"] [task=testx] [unit="binlog replication"] [component="binlog reader"] [error="parse relay log file mysql-bin.000012 from offset 53304003 in dir relay_log/0652de9c-ddd6-11e9-8f03-00163e00241b.000001: context canceled"]
[2020/07/13 18:16:17.451 +08:00] [INFO] [reader.go:413] ["binlog reader closed"] [task=testx] [unit="binlog replication"] [component="binlog reader"]
[2020/07/13 18:16:17.451 +08:00] [INFO] [checkpoint.go:464] ["rollback checkpoint"] [task=testx] [unit="binlog replication"] [component="remote checkpoint"] [checkpoint="(mysql-bin|000001.000012, 35492894)(flushed (mysql-bin|000001.000012, 35492894))"] [schema=fsk-systemctl] [table=sys_user]
[2020/07/13 18:16:17.451 +08:00] [INFO] [checkpoint.go:464] ["rollback checkpoint"] [task=testx] [unit="binlog replication"] [component="remote checkpoint"] [checkpoint="(mysql-bin|000001.000012, 39896667)(flushed (mysql-bin|000001.000012, 39896667))"] [schema=fsk-systemctl] [table=sys_code]
[2020/07/13 18:16:17.451 +08:00] [INFO] [checkpoint.go:464] ["rollback checkpoint"] [task=testx] [unit="binlog replication"] [component="remote checkpoint"] [checkpoint="(mysql-bin|000001.000012, 53302149)(flushed (mysql-bin|000001.000012, 53302149))"] [schema=fsk-systemctl] [table=sys_user_access]
[2020/07/13 18:16:17.451 +08:00] [INFO] [checkpoint.go:464] ["rollback checkpoint"] [task=testx] [unit="binlog replication"] [component="remote checkpoint"] [checkpoint="(mysql-bin|000001.000012, 35500041)(flushed (mysql-bin|000001.000012, 35500041))"] [schema=fsk-systemctl] [table=sys_user_data_authority]
[2020/07/13 18:16:17.451 +08:00] [INFO] [checkpoint.go:464] ["rollback checkpoint"] [task=testx] [unit="binlog replication"] [component="remote checkpoint"] [checkpoint="(mysql-bin|000001.000012, 35519864)(flushed (mysql-bin|000001.000012, 35519864))"] [schema=fsk_erp_trade] [table=et_assess_title_order]
[2020/07/13 18:16:17.451 +08:00] [INFO] [checkpoint.go:464] ["rollback checkpoint"] [task=testx] [unit="binlog replication"] [component="remote checkpoint"] [checkpoint="(mysql-bin|000001.000012, 51088501)(flushed (mysql-bin|000001.000012, 51088501))"] [schema=fsk_erp_trade] [table=et_device_order_data]
[2020/07/13 18:16:17.451 +08:00] [INFO] [checkpoint.go:464] ["rollback checkpoint"] [task=testx] [unit="binlog replication"] [component="remote checkpoint"] [checkpoint="(mysql-bin|000001.000012, 50230627)(flushed (mysql-bin|000001.000012, 50230627))"] [schema=fsk_erp_trade] [table=et_device_order_item]
[2020/07/13 18:16:17.451 +08:00] [INFO] [checkpoint.go:464] ["rollback checkpoint"] [task=testx] [unit="binlog replication"] [component="remote checkpoint"] [checkpoint="(mysql-bin|000001.000012, 35501499)(flushed (mysql-bin|000001.000012, 35501499))"] [schema=fsk-ehr] [table=ehr_staff_position]
[2020/07/13 18:16:17.451 +08:00] [INFO] [checkpoint.go:464] ["rollback checkpoint"] [task=testx] [unit="binlog replication"] [component="remote checkpoint"] [checkpoint="(mysql-bin|000001.000012, 35494366)(flushed (mysql-bin|000001.000012, 35494366))"] [schema=fsk-ehr] [table=ehr_staff]
[2020/07/13 18:16:17.453 +08:00] [INFO] [subtask.go:266] ["unit process returned"] [subtask=testx] [unit=Sync] [stage=Paused] [status="{\"totalEvents\":30785,\"totalTps\":11,\"recentTps\":1,\"masterBinlog\":\"(mysql-bin.000012, 56003922)\",\"masterBinlogGtid\":\"08e024dd-22db-11ea-837a-00163e04dda5:1-3918708\",\"syncerBinlog\":\"(mysql-bin|000001.000012, 53304003)\"}"]
[2020/07/13 18:16:17.453 +08:00] [ERROR] [subtask.go:285] ["unit process error"] [subtask=testx] [unit=Sync] ["error information"="{\"msg\":\"current pos (mysql-bin|000001.000012, 53304437): encountered incompatible DDL in TiDB:\\
\\tplease confirm your DDL statement is correct and needed.\\
\\tfor TiDB compatible DDL, please see the docs:\\
\\t English version: https://pingcap.com/docs/dev/reference/mysql-compatibility/#ddl\\
\\t Chinese version: https://pingcap.com/docs-cn/dev/reference/mysql-compatibility/#ddl\\
\\tif the DDL is not needed, you can use a filter rule with \\\"*\\\" schema-pattern to ignore it.\\
\\t : parse statement: [parser:1115]Unknown character set: 'utf32'%!!(MISSING)(EXTRA string=ALTER TABLE `fsk_erp_trade`.`et_device_order_round` \\r\\
MODIFY COLUMN `id` varchar(50) CHARACTER SET utf32 NOT NULL COMMENT '主键' FIRST,\\r\\
MODIFY COLUMN `round_detail` varchar(1000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '查房详情' AFTER `round_type`)\",\"error\":{\"ErrCode\":11006,\"ErrClass\":2,\"ErrScope\":3,\"ErrLevel\":3,\"Message\":\"current pos (mysql-bin|000001.000012, 53304437): encountered incompatible DDL in TiDB:\\
\\tplease confirm your DDL statement is correct and needed.\\
\\tfor TiDB compatible DDL, please see the docs:\\
\\t English version: https://pingcap.com/docs/dev/reference/mysql-compatibility/#ddl\\
\\t Chinese version: https://pingcap.com/docs-cn/dev/reference/mysql-compatibility/#ddl\\
\\tif the DDL is not needed, you can use a filter rule with \\\"*\\\" schema-pattern to ignore it.\\
\\t : parse statement: [parser:1115]Unknown character set: 'utf32'%!!(MISSING)(EXTRA string=ALTER TABLE `fsk_erp_trade`.`et_device_order_round` \\r\\
MODIFY COLUMN `id` varchar(50) CHARACTER SET utf32 NOT NULL COMMENT '主键' FIRST,\\r\\
MODIFY COLUMN `round_detail` varchar(1000) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '查房详情' AFTER `round_type`)\",\"RawCause\":\"[parser:1115]Unknown character set: 'utf32'\"}}"]
[2020/07/13 18:16:17.634 +08:00] [INFO] [server.go:229] [request=QueryTaskOperation] [payload="name:\"testx\" logID:15 "]
[2020/07/13 18:16:22.407 +08:00] [WARN] [task_checker.go:358] ["backoff skip auto resume task"] [component="task checker"] [task=testx] [latestResumeTime=2020/07/13 18:14:02.407 +08:00] [duration=5m0s]
[2020/07/13 18:16:27.407 +08:00] [WARN] [task_checker.go:358] ["backoff skip auto resume task"] [component="task checker"] [task=testx] [latestResumeTime=2020/07/13 18:14:02.407 +08:00] [duration=5m0s]