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

refactor: move server.id for MySQL CDC from meta to fe #19169

Merged
merged 2 commits into from
Nov 1, 2024

Conversation

xxchan
Copy link
Member

@xxchan xxchan commented Oct 29, 2024

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

motivation is to simplify create stream job process in meta (prepare for #19171, where we will completely remove fill_table_stream_graph_info)

Also made a behavior change: previously, auto assign server.id will only for legacy CREATE TABLE CDC, but not shared CREATE SOURCE.

previous work: #13031

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added test labels as necessary. See details.
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

Copy link
Member Author

xxchan commented Oct 29, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @xxchan and the rest of your teammates on Graphite Graphite

@xxchan xxchan force-pushed the xxchan/desirable-trout branch 3 times, most recently from 0399933 to fa620ec Compare October 29, 2024 09:23
@xxchan xxchan requested review from StrikeW and BugenZhao October 29, 2024 14:22
@xxchan xxchan force-pushed the xxchan/desirable-trout branch 2 times, most recently from 9f4c672 to 2cab4a1 Compare October 29, 2024 15:11
@xxchan xxchan changed the base branch from main to xxchan/format-encode October 29, 2024 15:11
@xxchan xxchan force-pushed the xxchan/desirable-trout branch from 2cab4a1 to f59bc27 Compare October 29, 2024 16:00
@xxchan xxchan changed the base branch from xxchan/format-encode to main October 29, 2024 16:00
motivation is to simplify create stream job process in meta

Signed-off-by: xxchan <[email protected]>
@@ -1465,6 +1466,14 @@ pub fn bind_connector_props(
.to_string(),
);
}
if !is_create_source && 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we ensure uniqueness by generating a random number locally?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't guarantee uniqueness, this is just a side note.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is just a side note

I don't quite get this. So will this be a problem?

@xxchan xxchan force-pushed the xxchan/desirable-trout branch from f59bc27 to 06fd5cb Compare November 1, 2024 07:51
@@ -45,7 +45,6 @@ create source s with (
username = 'shared-cdc',
password = 'abcdef',
database.name = 'testdb1',
server.id = '114514'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manually tested that before this PR, this test will fail if server.id not specified

@xxchan xxchan requested review from BugenZhao and StrikeW November 1, 2024 07:58
@xxchan xxchan enabled auto-merge November 1, 2024 08:01
@xxchan xxchan added this pull request to the merge queue Nov 1, 2024
@graphite-app graphite-app bot requested a review from a team November 1, 2024 08:31
Merged via the queue into main with commit 051fbad Nov 1, 2024
33 of 34 checks passed
@xxchan xxchan deleted the xxchan/desirable-trout branch November 1, 2024 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants