Skip to content

Commit

Permalink
ticdc: add example of how to show bdr role (#19238) (#19260)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Oct 31, 2024
1 parent c1b373c commit 137a254
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
14 changes: 14 additions & 0 deletions ticdc/ticdc-bidirectional-replication.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,20 @@ In short, in BDR mode, TiCDC only replicates replicable DDLs in the PRIMARY clus
### 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

0 comments on commit 137a254

Please sign in to comment.