Changefeed Task Configuration for Bidirectional Synchronization Reports Primary Key Conflict Error

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

Original topic: changefeed任务配置双向同步,报主键冲突错误

| username: TiDBer_P0XYtakZ

[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version]
[Reproduction Path] After installing TiDB and configuring bidirectional synchronization, data written to Machine A is synchronized to Machine B. After a period of time, a primary key conflict error is reported, and the data in the table on Machines A and B is inconsistent.
[Attachment: Screenshot/Log/Monitoring]

| username: zhaokede | Original post link

What is being used as the primary key? Is there any isolation done on the business side?

| username: yiduoyunQ | Original post link

  1. Check if bdr-mode = true is enabled.
  2. Check if the data on the peer end exists in advance.
| username: 小龙虾爱大龙虾 | Original post link

Why do we need bidirectional synchronization? :joy:

| username: TIDB-Learner | Original post link

Check the primary key, update if the data exists, insert if it does not. This logic is determined on the business side. I would like to ask, can ticdc achieve this?

| username: Hacker_zuGnSsfP | Original post link

If doing bidirectional synchronization, the table structures must be exactly the same, right?