You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[DBI-798] MySQL Connector: Allow passing server_id as a peer configuration parameter (#4525)
This PR allows setting `server_id` on MySQL/MariaDB peers.
When it is present, CDC flows will use this value as the [replication
`server_id`](https://dev.mysql.com/doc/mysql-replication-excerpt/5.7/en/replication-options.html#:~:text=server_id%20is%20set%20to%200,replica%20in%20the%20replication%20topology.)
in the declared MySQL replica.
This is an optional field in the configuration and offers a
deterministic alternative to the default "random id" select upon CDC
flow initialization in the current implementation and in the new
implementation when the value is missing.
Note that if a peer has this option, it can not be re-used in different
mirrors. This PR also includes changes to prevent the creation of such
mirrors through validation.
<img width="1222" height="866" alt="image"
src="https://github.com/user-attachments/assets/ecdec95f-5285-46fd-8e1d-430dcecb5c7e"
/>
Commits are organized so they can be reviewed independently:
- bb949c0 Core functionality, adding
optional parameter to the gRPC specification of PeerDB API and
propagating it down to CDC initialization.
- 729225c e2e tests for this
functionality.
- 132c87e Add a validation step in the
create/validate API endpoints that prevents re-using the same MySQL peer
in two mirrors if it has `server_id` set.
- 35f565f API e2e tests for this
validation.
- 0950728 PeerDB UI changes to include
this field in MySQL peer configuration
Part of: https://linear.app/clickhouse/issue/DBI-798
0 commit comments