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: add description about safe-mode arguments #19849

Merged
merged 3 commits into from
Feb 19, 2025
Merged
Changes from 1 commit
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
1 change: 1 addition & 0 deletions ticdc/ticdc-sink-to-mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ URI 中可配置的参数如下:
| `ssl-key` | 连接下游 MySQL 实例所需的证书密钥文件路径(可选)。 |
| `time-zone` | 连接下游 MySQL 实例时使用的时区名称,从 v4.0.8 开始生效。(可选。如果不指定该参数,使用 TiCDC 服务进程的时区;如果指定该参数但使用空值,例如:`time-zone=""`,则表示连接 MySQL 时不指定时区,使用下游默认时区)。 |
| `transaction-atomicity` | 指定事务的原子性级别(可选,默认值为 `none`)。当该值为 `table` 时 TiCDC 保证单表事务的原子性,当该值为 `none` 时 TiCDC 会拆分单表事务。 |
| `safe-mode` | 指定向下游同步数据时 `INSERT` 和 `UPDATE` 语句的处理方式。当设置为 `true` 时,所有的 `INSERT` 语句会被转换为 `REPLACE INTO` 语句,而所有的 `UPDATE` 语句转换为 `DELETE` + `REPLACE INTO` 语句。在 v6.1.3 版本之前,该配置的默认值为 `true`。从 v6.1.3 版本开始,默认值调整为 `false`,在此版本及之后的版本中,TiCDC 在启动时会获取一个当前时间戳 `ThresholdTs`,对于 `CommitTs` 小于 `ThresholdTs` 的`INSERT` 语句和 `UPDATE` 语句,TiCDC 会分别将其转换为`REPLACE INTO` 语句和 `DELETE` + `REPLACE INTO` 语句。对于其他情况,`INSERT` 语句将直接同步,而 `UPDATE` 语句的具体行为则参考[TiCDC 拆分 UPDATE 事件行为说明](/ticdc/ticdc-split-update-behavior.md) |

若需要对 Sink URI 中的数据库密码使用 Base64 进行编码,可以参考如下命令:

Expand Down