Skip to content

Commit

Permalink
add server.id for both table & source
Browse files Browse the repository at this point in the history
Signed-off-by: xxchan <[email protected]>
  • Loading branch information
xxchan committed Nov 1, 2024
1 parent 299809c commit 06fd5cb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ create source s with (
username = 'shared-cdc',
password = 'abcdef',
database.name = 'testdb1',
server.id = '114514'
);

sleep 2s
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/handler/create_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1466,7 +1466,7 @@ pub fn bind_connector_props(
.to_string(),
);
}
if !is_create_source && with_properties.is_mysql_cdc_connector() {
if with_properties.is_mysql_cdc_connector() {
// Generate a random server id for mysql cdc source if needed
// `server.id` (in the range from 1 to 2^32 - 1). This value MUST be unique across whole replication
// group (that is, different from any other server id being used by any master or slave)
Expand Down

0 comments on commit 06fd5cb

Please sign in to comment.