Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ticdc: update "safe-mode" description (#19785) #19791

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ticdc/ticdc-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,9 @@ mysql [email protected]:test> show create table test;

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

在 v6.1.3 版本之前,`safe-mode` 默认为 `true`,即所有的 `INSERT` 和 `UPDATE` 语句都转成 `REPLACE INTO` 语句。在 v6.1.3 及之后版本,系统能自动判断下游是否存在重复数据,`safe-mode` 默认更改为 `false`,当系统判断下游无重复数据时,会直接同步 `INSERT` 和 `UPDATE` 语句。
在 v6.1.3 版本之前,`safe-mode` 的默认值为 `true`,即所有的 `INSERT` 和 `UPDATE` 语句都转成 `REPLACE INTO` 语句。

在 v6.1.3 及之后版本,`safe-mode` 的默认值更改为 `false`,而且 TiCDC 能自动判断下游是否存在重复数据。当 TiCDC 判断下游无重复数据时,会直接同步 `INSERT` 和 `UPDATE` 语句;否则,TiCDC 会将 `INSERT` 和 `UPDATE` 语句都转成 `REPLACE INTO` 语句再进行同步。

## 为什么 TiCDC 需要使用磁盘,什么时候会写磁盘,TiCDC 能否利用内存缓存提升同步性能?

Expand Down