Skip to content

Commit

Permalink
ticdc: add description about safe-mode arguments (#19849) (#19865)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Feb 24, 2025
1 parent 5115597 commit 852dd30
Showing 1 changed file with 1 addition and 0 deletions.
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` 时,TiCDC 会将上游所有的 `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` 语句。对于 `CommitTs` 大于等于 `ThresholdTs``INSERT` 语句和 `UPDATE` 语句,`INSERT` 语句将直接同步到下游,`UPDATE` 语句的具体行为则参考 [TiCDC 拆分 UPDATE 事件行为说明](/ticdc/ticdc-split-update-behavior.md)|

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

Expand Down

0 comments on commit 852dd30

Please sign in to comment.