Skip to content

Commit 137a254

Browse files
authored
ticdc: add example of how to show bdr role (#19238) (#19260)
1 parent c1b373c commit 137a254

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

Diff for: ticdc/ticdc-bidirectional-replication.md

+14
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,20 @@ In short, in BDR mode, TiCDC only replicates replicable DDLs in the PRIMARY clus
9999
### Replication scenarios of replicable DDLs
100100

101101
1. Choose a TiDB cluster and execute `ADMIN SET BDR ROLE PRIMARY` to set it as the primary cluster.
102+
103+
```sql
104+
ADMIN SET BDR ROLE PRIMARY;
105+
Query OK, 0 rows affected
106+
Time: 0.003s
107+
108+
ADMIN SHOW BDR ROLE;
109+
+----------+
110+
| BDR_ROLE |
111+
+----------+
112+
| primary |
113+
+----------+
114+
```
115+
102116
2. On other TiDB clusters, execute `ADMIN SET BDR ROLE SECONDARY` to set them as the secondary clusters.
103117
3. Execute **replicable DDLs** on the primary cluster. The successfully executed DDLs will be replicated to the secondary clusters by TiCDC.
104118

Diff for: ticdc/ticdc-changefeed-config.md

+5
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ case-sensitive = false
7474
# The format of this parameter is "h m s", for example, "1h30m30s".
7575
changefeed-error-stuck-duration = "30m"
7676
77+
# The default value is false, indicating that bi-directional replication (BDR) mode is not enabled.
78+
# To set up BDR clusters using TiCDC, modify this parameter to `true` and set the TiDB clusters to BDR mode.
79+
# For more information, see https://docs.pingcap.com/tidb/stable/ticdc-bidirectional-replication.
80+
# bdr-mode = false
81+
7782
[mounter]
7883
# The number of threads with which the mounter decodes KV data. The default value is 16.
7984
# worker-num = 16

0 commit comments

Comments
 (0)