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

[FLINK-35648][runtime] Allow applying multiple route rules for one single source table #3425

Merged
merged 6 commits into from
Jun 24, 2024

Conversation

yuxiqian
Copy link
Contributor

@yuxiqian yuxiqian commented Jun 19, 2024

This closes FLINK-35648.

Currently, any upstream table could be routed at most once. If we wrote such a route definition:

routes:
  - source-table: db.(A|B)
    sink-table: terminal.one
  - source-table: db.(B|C)
    sink-table: terminal.two

Then, schema / data changes from db.B will be sent to terminal.one only, not to terminal.two since it has been handled by the first route rule.

This PR added route behavior option (FIRST_MATCH / COMPLETE) to configure if all route rules should be applied or only the first matched rule (for backwards compatibility).

After some discussion, now legacy "first match" route behavior is regarded as a mistake, and no configuration is needed now.

@yuxiqian
Copy link
Contributor Author

@ruanhang1993 Adjusted this PR and dropped legacy route behavior, PTAL

Copy link
Contributor

@ruanhang1993 ruanhang1993 left a comment

Choose a reason for hiding this comment

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

Please send some SchemaChangeEvent in tests.

Copy link
Contributor

@ruanhang1993 ruanhang1993 left a comment

Choose a reason for hiding this comment

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

LGTM.

@ruanhang1993 ruanhang1993 merged commit 3441a1e into apache:master Jun 24, 2024
15 checks passed
wuzhenhua01 pushed a commit to wuzhenhua01/flink-cdc-connectors that referenced this pull request Aug 4, 2024
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.

2 participants