How to Skip Primary Key Conflicts When Drainer Synchronization Reports Errors

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: drainer同步报错,主键冲突怎么跳过呢

| username: LBX流鼻血

[TiDB Usage Environment] Production Environment
[TiDB Version] 4.0.6
[Reproduction Path]


Drainer synchronization error, initially it kept reporting conflicts, and later it directly exited. How can I ignore these primary key conflicts and let it continue running?

| username: Fly-bird | Original post link

There is an option to ignore, right?

| username: 像风一样的男子 | Original post link

After restarting, it will automatically skip.

| username: LBX流鼻血 | Original post link

It seems like there isn’t one. I searched through the documentation and found a binlog.ignore-error and a [syncer] ignore-error = true, but it reports a parameter error.

| username: tidb菜鸟一只 | Original post link

Specify the ts to skip, ignore-txn-commit-ts, and then restart the drainer.

| username: LBX流鼻血 | Original post link

I don’t know exactly where the problem is, but when encountering issues, skipping all of them is too much, and the consistency requirements aren’t that high. Skipping one by one is too troublesome.

| username: tidb菜鸟一只 | Original post link

So what’s the point of this synchronization? The data between upstream and downstream is already inconsistent…