Why do `INSERT`/`UPDATE` statements from the upstream become `REPLACE INTO` after being replicated to the downstream if I set `enable-old-value` to `true` when I create a TiCDC replication task?

TiCDC guarantees that all data is replicated at least once. When there is duplicate data in the downstream, write conflicts occur. To avoid this problem, TiCDC converts INSERT and UPDATE statements into REPLACE INTO statements. This behavior is controlled by the safe-mode parameter.

In versions earlier than v6.1.3, safe-mode defaults to true, which means all INSERT and UPDATE statements are converted into REPLACE INTO statements. In v6.1.3 and later versions, TiCDC can automatically determine whether the downstream has duplicate data, and the default value of safe-mode changes to false. If no duplicate data is detected, TiCDC replicates INSERT and UPDATE statements without conversion.