binlog同步错误

tidb 4.0.8

drainer 不能同步
[2020/11/24 13:08:46.757 +08:00] [WARN] [load.go:336] [“table has no any primary key and unique index, it may be slow when syncing data to downstream, we highly recommend add primary key or unique key for table”] [table=test.tab01]
[2020/11/24 13:08:46.759 +08:00] [ERROR] [executor.go:111] [“Exec fail, will rollback”] [query=“REPLACE INTO test.tab01(id,name) VALUES(?,?)”] [args="[1,“xiebin1204”]"] [error=“Error 3098: The table does not comply with the requirements by an external plugin.”]
[2020/11/24 13:08:46.766 +08:00] [INFO] [collector.go:283] [“start query job”] [id=47] [binlog="tp:Commit start_ts:421052276589199365 commit_ts:421052276602568705 prewrite_key:“mDB:1\000\000\000\000\373\000\000\000\000\000\000\000H” ddl_query:“drop table tab01” ddl_job_id:47 "]
[2020/11/24 13:08:46.776 +08:00] [INFO] [collector.go:305] [“get ddl job”] [job=“ID:47, Type:drop table, State:synced, SchemaState:none, SchemaID:1, TableID:45, RowCount:0, ArgLen:0, start time: 2020-11-24 11:02:47.04 +0800 CST, Err:, ErrCount:0, SnapshotVersion:0”]
[2020/11/24 13:08:46.776 +08:00] [INFO] [syncer.go:442] [“add ddl item to syncer, you can add this commit ts to ignore-txn-commit-ts to skip this ddl if needed”] [sql=“drop table tab01”] [“commit ts”=421052276602568705]
[2020/11/24 13:08:46.778 +08:00] [INFO] [collector.go:283] [“start query job”] [id=49] [binlog=“tp:Commit start_ts:421052293327093763 commit_ts:421052293327093765 prewrite_key:“mDB:1\000\000\000\000\373\000\000\000\000\000\000\000H” ddl_query:“CREATE TABLE users (\ id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,\ username VARCHAR(60) NOT NULL,\ UNIQUE KEY (username)\ )” ddl_job_id:49 ddl_schema_state:5 “]
[2020/11/24 13:08:46.780 +08:00] [INFO] [collector.go:305] [“get ddl job”] [job=“ID:49, Type:create table, State:synced, SchemaState:public, SchemaID:1, TableID:48, RowCount:0, ArgLen:0, start time: 2020-11-24 11:03:51.94 +0800 CST, Err:, ErrCount:0, SnapshotVersion:0”]
[2020/11/24 13:08:46.781 +08:00] [INFO] [syncer.go:442] [“add ddl item to syncer, you can add this commit ts to ignore-txn-commit-ts to skip this ddl if needed”] [sql=“CREATE TABLE users (\ id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,\ username VARCHAR(60) NOT NULL,\ UNIQUE KEY (username)\ )”] [“commit ts”=421052293327093765]
[2020/11/24 13:08:47.761 +08:00] [ERROR] [executor.go:111] [“Exec fail, will rollback”] [query=“REPLACE INTO test.tab01(id,name) VALUES(?,?)”] [args=”[1,“xiebin1204”]”] [error=“Error 3098: The table does not comply with the requirements by an external plugin.”]

配置了start_ts 参数就启动不了

你好,
辛苦描述下上下游都是什么环境,什么版本
请提供下 test.tab01 的表结构。貌似是主键不存在的问题。

下流是mysql8.0.20
create table tab01(id int,name varchar(20))
现在处理,是跳过这个表就可以,我想问,设置ts,能解决这个问题吗。我在drainer 配置文件添加ts启动就失败

建议将主键添加上,
或者可以先忽略该表,后面使用 dumpling 将此表重新导入,并根据 meta 文件中的 pos 点将进行同步

https://docs.pingcap.com/zh/tidb/stable/tidb-binlog-configuration-file#ignore-table