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-35415][base] Fix compatibility with Flink 1.19 #3348

Merged
merged 5 commits into from
Jun 6, 2024

Conversation

yuxiqian
Copy link
Contributor

@yuxiqian yuxiqian commented May 22, 2024

This closes FLINK-35092, FLINK-35120, FLINK-35316, FLINK-35415.

  • Adds E2e testcases on recent Flink versions including 1.19
  • Fixes CDC compatibility issue with 1.19 (due to breaking changes in @internal classes)

This is a temporary workaround to avoid breaking compatibility with Flink 1.19. Proposal about upgrading Flink base (FLINK-35385) could be implemented later.

@yuxiqian
Copy link
Contributor Author

yuxiqian commented May 22, 2024

@lvyanquan PTAL

// during Flink 1.18 to 1.19. Remove this when Flink 1.18 is no longer supported.
try {
return (SimpleVersionedSerializer<CommT>)
sink.getClass().getDeclaredMethod("getCommittableSerializer").invoke(sink);
Copy link
Contributor

Choose a reason for hiding this comment

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

Considering that we have had similar operations before in DataSinkWriterOperator, this change is acceptable for me.

Copy link
Contributor Author

@yuxiqian yuxiqian May 23, 2024

Choose a reason for hiding this comment

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

Yeah, but it's definitely not an encouraged way to play with Flink :( Maybe we can decouple Flink base with specific connectors and distribute CDC with various Flink versions respectively.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1, distribute CDC with various Flink versions in the future is recommended just like other flink external connectors

@yuxiqian
Copy link
Contributor Author

Thanks for @lvyanquan's review, I've split out commits based on FLINK ticket.

@yuxiqian
Copy link
Contributor Author

Pushed another commit to resolve CI issue, could @leonardBang please re-trigger the CI? Thanks!

Copy link
Contributor

@lvyanquan lvyanquan left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Contributor

@leonardBang leonardBang left a comment

Choose a reason for hiding this comment

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

Thanks @yuxiqian for the nice work, the change looks good to me. I left minor comments. It will better if you can organize the commits to make each main change more clear e.g. bump flink version could be in one separate commit, fix sink compatibility could be in another commit, and add e2e case could be in another commit.

// during Flink 1.18 to 1.19. Remove this when Flink 1.18 is no longer supported.
try {
return (SimpleVersionedSerializer<CommT>)
sink.getClass().getDeclaredMethod("getCommittableSerializer").invoke(sink);
Copy link
Contributor

Choose a reason for hiding this comment

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

+1, distribute CDC with various Flink versions in the future is recommended just like other flink external connectors

@yuxiqian
Copy link
Contributor Author

yuxiqian commented Jun 5, 2024

Done, seems I messed up the commit history during last rebase... Fixed it.

@yuxiqian yuxiqian requested a review from leonardBang June 5, 2024 06:08
Copy link
Contributor

@leonardBang leonardBang left a comment

Choose a reason for hiding this comment

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

Thanks @yuxiqian for the update, LGTM

@leonardBang leonardBang merged commit 1a36063 into apache:master Jun 6, 2024
14 checks passed
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.

None yet

3 participants