Skip to content

Conversation

MOBIN-F
Copy link
Contributor

@MOBIN-F MOBIN-F commented Jul 31, 2024

paimon cdc schema evolution failure when restart job

Minimal reproduce step:

  1. stop flink-cdc-mysql-to-paimon pipeline job
  2. alter mysql table schema, such as add column
  3. start pipeline job
  4. the newly added column was not synchronized to the paimon table

@MOBIN-F MOBIN-F changed the title [FLINK-35936] fix paimon cdc schema evolution failure when restart job [FLINK-35936][cdc-connector][paimon] Fix paimon cdc schema evolution failure when restart job Jul 31, 2024
@leonardBang
Copy link
Contributor

Thanks @MOBIN-F for the contribution, could you add description for the PR ?


@ParameterizedTest
@ValueSource(strings = {"filesystem", "hive"})
public void testOfflineAlterExistsTableSchema(String metastore)
Copy link
Contributor

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)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes

Copy link
Contributor

@lvyanquan lvyanquan Aug 24, 2024

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

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

MOBIN-F added 5 commits August 9, 2024 17:20
…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
Copy link

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.

@github-actions github-actions bot added the Stale label Dec 22, 2024
Copy link

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.

@github-actions github-actions bot closed this Feb 21, 2025
@lvyanquan lvyanquan reopened this Jun 11, 2025
Copy link

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.

@github-actions github-actions bot closed this Aug 11, 2025
@leonardBang leonardBang reopened this Aug 11, 2025
@lvyanquan
Copy link
Contributor

Hi @MOBIN-F.
I think that this can be closed as it was solved in #4081.
I believe that modifying the data to adapt to the downstream table structure is a safer solution compared to modifying the downstream table structure through the task to accommodate the data. What do you think?

@MOBIN-F
Copy link
Contributor Author

MOBIN-F commented Sep 17, 2025

Hi @MOBIN-F. I think that this can be closed as it was solved in #4081. I believe that modifying the data to adapt to the downstream table structure is a safer solution compared to modifying the downstream table structure through the task to accommodate the data. What do you think?

agree~

@MOBIN-F MOBIN-F closed this Sep 17, 2025
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