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 example of how to show bdr role (#16393) #16394

Merged
Merged
Show file tree
Hide file tree
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
16 changes: 15 additions & 1 deletion ticdc/ticdc-bidirectional-replication.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,21 @@ TiCDC 复制功能只会将指定时间点之后的增量变更复制到下游

### 可复制的 DDL 的同步场景

1. 选择一个 TiDB 集群,执行 `ADMIN SET BDR ROLE PRIMARY` 将其设置为主集群。
1. 选择一个 TiDB 集群,执行 `ADMIN SET BDR ROLE PRIMARY` 将其设置为主集群。如下所示:

```sql
ADMIN SET BDR ROLE PRIMARY;
Query OK, 0 rows affected
Time: 0.003s

ADMIN SHOW BDR ROLE;
+----------+
| BDR_ROLE |
+----------+
| primary |
+----------+
```

2. 在其他 TiDB 集群上,执行 `ADMIN SET BDR ROLE SECONDARY` 将其设置为从集群。
3. 在主集群上执行**可复制的 DDL**,执行成功的 DDL 会被 TiCDC 同步到从集群中。

Expand Down
5 changes: 5 additions & 0 deletions ticdc/ticdc-changefeed-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ case-sensitive = false
# 默认值和 TiDB 的默认 SQL 模式一致
# sql-mode = "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

# 默认值为 false,表示不处于 BDR 模式。
# 如果要使用 TiCDC 搭建 BDR 集群,需要将该参数设置为 true,同时要将 TiDB 集群设置为 BDR 模式。
# 详情请参考:https://docs.pingcap.com/zh/tidb/stable/ticdc-bidirectional-replication#ticdc-双向复制
# bdr-mode = false

[mounter]
# mounter 解码 KV 数据的线程数,默认值为 16
# worker-num = 16
Expand Down
Loading