How to handle DM without errors when upgrading the upstream MySQL database and switching binlog back and forth?

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

Original topic: 上游数据库mysql升级,要切换binlog在切换回来,dm要怎么处理不会报错?

| username: Jjjjayson_zeng

[TiDB Usage Environment] Production Environment
[TiDB Version]
[Reproduction Path] What operations were performed when the issue occurred
[Encountered Issue: Issue Phenomenon and Impact]
[Resource Configuration]
[Attachment: Screenshots/Logs/Monitoring] Encountered “binlog not found” error

| username: dba-kit | Original post link

Check the official switching steps and recommendations. Additionally, it is suggested to use GTID when creating tasks. In my practical experience, after enabling GTID and performing master-slave switch, the DM task had no issues.