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 (#19238) #19262

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
14 changes: 14 additions & 0 deletions ticdc/ticdc-bidirectional-replication.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,20 @@ When no BDR role is set, you can execute any DDL. But after you set `bdr_mode=tr
### Replication scenarios of replicable DDLs

1. Choose a TiDB cluster and execute `ADMIN SET BDR ROLE PRIMARY` to set it as the primary cluster.

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

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

2. On other TiDB clusters, execute `ADMIN SET BDR ROLE SECONDARY` to set them as the secondary clusters.
3. Execute **replicable DDLs** on the primary cluster. The successfully executed DDLs will be replicated to the secondary clusters by 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 @@ -74,6 +74,11 @@ case-sensitive = false
# The format of this parameter is "h m s", for example, "1h30m30s".
changefeed-error-stuck-duration = "30m"

# The default value is false, indicating that bi-directional replication (BDR) mode is not enabled.
# To set up BDR clusters using TiCDC, modify this parameter to `true` and set the TiDB clusters to BDR mode.
# For more information, see https://docs.pingcap.com/tidb/stable/ticdc-bidirectional-replication.
# bdr-mode = false

[mounter]
# The number of threads with which the mounter decodes KV data. The default value is 16.
# worker-num = 16
Expand Down
Loading