Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: TiCDC同步数据如何配置忽略主键冲突
In the process of using TiCDC for primary-secondary cluster replication, for tables without primary keys, how can you configure to skip primary key conflicts without considering data consistency, allowing replication to continue and synchronization to remain normal?
CDC internally rewrites SQL as a replace operation before synchronizing it downstream, so writing to downstream should theoretically be an idempotent operation.
What specific problem did you encounter?
Yes, there may be data inconsistency. Check the official documentation. ![:face_with_hand_over_mouth: :face_with_hand_over_mouth:](https://ask.pingcap.com/images/emoji/apple/face_with_hand_over_mouth.png?v=12)
What do you mean? How can there be a primary key conflict in a table without a primary key?
You mean there are tables without primary keys, and when creating a changefeed, there will be a prompt indicating the existence of tables without primary keys? If consistency is not a concern, you can directly confirm and skip it. ![:face_with_open_eyes_and_hand_over_mouth: :face_with_open_eyes_and_hand_over_mouth:](https://ask.pingcap.com/images/emoji/apple/face_with_open_eyes_and_hand_over_mouth.png?v=12)
After skipping, data verification becomes very troublesome.
Tables without primary keys or unique keys will not be synchronized by default.
It can be understood as idempotent.