Skip to content

Commit

Permalink
ticdc: fix the description of safe-mode (#13792) (#13810)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot committed Apr 26, 2023
1 parent daf1969 commit 545224d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ticdc/ticdc-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ mysql root@127.0.0.1:test> show create table test;

产生表结构不一致的原因是 `explicit_defaults_for_timestamp`[默认值在 TiDB 和 MySQL 5.7 不同](/mysql-compatibility.md#默认设置)。从 TiCDC v5.0.1/v4.0.13 版本开始,同步到 MySQL 会自动设置 session 变量 `explicit_defaults_for_timestamp = ON`,保证同步时间类型时上下游行为一致。对于 v5.0.1/v4.0.13 以前的版本,同步时间类型时需要注意 `explicit_defaults_for_timestamp` 默认值不同带来的兼容性问题。

## 使用 TiCDC 创建同步任务时将 `enable-old-value` 设置为 `true` 后,为什么上游的 `INSERT`/`UPDATE` 语句经 TiCDC 同步到下游后变为了 `REPLACE INTO`
## 使用 TiCDC 创建同步任务时将 `safe-mode` 设置为 `true` 后,为什么上游的 `INSERT`/`UPDATE` 语句经 TiCDC 同步到下游后变为了 `REPLACE INTO`

TiCDC 提供至少一次的数据同步保证,当下游有重复数据时,会引起写冲突。为了避免该问题,TiCDC 会将 `INSERT``UPDATE` 语句转成 `REPLACE INTO` 语句。该行为由 `safe-mode` 参数来控制。

Expand Down

0 comments on commit 545224d

Please sign in to comment.