[TiDB Usage Environment] Production Environment / Testing / Poc
[TiDB Version]
[Reproduction Path] What operations were performed when the issue occurred
[Encountered Issue: Issue Phenomenon and Impact]
[Resource Configuration]
[Attachment: Screenshot/Log/Monitoring]
Hello, the position in relay.meta refers to the starting point from which the upstream binlog is pulled. When an error occurs during synchronization, it means that an event in the relay log encountered an error when being executed downstream, so modifying relay.meta is ineffective. Generally, when encountering issues with replication, it is highly likely that the downstream TiDB does not support it. Therefore, you can use sql-skip to skip the error or modify the binlog filter in the task configuration to filter it out in advance. If you want to specify starting synchronization from a certain position, you can modify the checkpoint information (not recommended, as incorrect modifications may lead to data loss).
Change safe-mode to true, then perform stop-task and start-task, and observe whether DM reports any errors. If it is a normal primary key conflict, it will not report an error. If there is an issue with the command execution, you can check the error logs of TiDB. Additionally, based on the pos point, retrieve the corresponding SQL statement and execute it in TiDB to see if there are any errors.