DM Synchronization Error

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

Original topic: dm 同步报错

| username: Hacker_suny

[TiDB Usage Environment] Production Environment
[TiDB Version]
[Reproduction Path] What operations were performed when the issue occurred
[Encountered Issue: Issue Phenomenon and Impact]
DM synchronization error as follows
“ErrCode”: 10006,
“ErrClass”: “database”,
“ErrScope”: “not-set”,
“ErrLevel”: “high”,
“Message”: “startLocation: [position: (, 0), gtid-set: ], endLocation: [position: (mysql-bin.008821, 978480682), gtid-set: ]: execute statement failed: commit”,
“RawCause”: “Error 1062: Duplicate entry ‘141800001057044’ for key ‘index_posx_device_no’”,

handle-error cannot handle it. Is there any way to solve it?

| username: 小龙虾爱大龙虾 | Original post link

The DM synchronization mechanism requires the table to have at least one valid index. If the safe mode is not enabled, it will automatically enter the safe mode for a period of time when the task just starts. If you don’t know why there is an error, you can enable the safe mode. Refer to: DM 安全模式 | PingCAP 文档中心

| username: Hacker_suny | Original post link

My version is too old and doesn’t support safe mode. Can I use handle-error to skip it?

| username: 小龙虾爱大龙虾 | Original post link

Manually delete downstream conflict data.