-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[FLINK-35936][cdc-connector][paimon] Fix paimon cdc schema evolution failure when restart job #3502
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-35936][cdc-connector][paimon] Fix paimon cdc schema evolution failure when restart job #3502
Conversation
Thanks @MOBIN-F for the contribution, could you add description for the PR ? |
|
||
@ParameterizedTest | ||
@ValueSource(strings = {"filesystem", "hive"}) | ||
public void testOfflineAlterExistsTableSchema(String metastore) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the expected scenario to be solved is actually a scenario where the table structures of downstream that was previously created are inconsistent with upstream(mysql)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this change carries risks, I tend to add a sink option to explicitly support this:
When the upstream and downstream table structures are inconsistent, users can manually modify the table structure to adapt.
If this is done in the program, in the case where the user configures the wrong route
rule (which is not a particularly rare situation), the situation where the table structure does not correspond should throw an exception. However, we will forcibly modify downstream tables to adapt, and the user will not be aware of this error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, You are right, I only considered the * situation before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lvyanquan Could you please review it again? thank you
…ma-evolution-failure # Conflicts: # flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-paimon/src/main/java/org/apache/flink/cdc/connectors/paimon/sink/PaimonMetadataApplier.java
# Conflicts: # flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-paimon/src/main/java/org/apache/flink/cdc/connectors/paimon/sink/PaimonMetadataApplier.java
This pull request has been automatically marked as stale because it has not had recent activity for 60 days. It will be closed in 30 days if no further activity occurs. |
This pull request has been closed because it has not had recent activity. You could reopen it if you try to continue your work, and anyone who are interested in it are encouraged to continue work on this pull request. |
This pull request has been closed because it has not had recent activity. You could reopen it if you try to continue your work, and anyone who are interested in it are encouraged to continue work on this pull request. |
paimon cdc schema evolution failure when restart job
Minimal reproduce step: