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-36183] Fix lenient schema evolution failure with route blocks #3583

Merged
merged 2 commits into from
Aug 30, 2024

Conversation

yuxiqian
Copy link
Contributor

We should applySchemaChange (where the route rule works) first and lenientize its result then, or we may not be able to get evolved schema since tableId isn't routed:

Caused by: java.lang.IllegalStateException: Evolved schema does not exist, not ready for schema change event AddColumnEvent{tableId=kunni_test.customers, addedColumns=[ColumnWithPosition{column=`newCol2` VARCHAR(100), position=AFTER, existedColumnName=newCol}]}
	at org.apache.flink.cdc.runtime.operators.schema.coordinator.SchemaRegistryRequestHandler.lambda$lenientizeSchemaChangeEvent$3(SchemaRegistryRequestHandler.java:378)
	at java.util.Optional.orElseThrow(Optional.java:290)
	at org.apache.flink.cdc.runtime.operators.schema.coordinator.SchemaRegistryRequestHandler.lenientizeSchemaChangeEvent(SchemaRegistryRequestHandler.java:376)
	at org.apache.flink.cdc.runtime.operators.schema.coordinator.SchemaRegistryRequestHandler.calculateDerivedSchemaChangeEvents(SchemaRegistryRequestHandler.java:360)
	at org.apache.flink.cdc.runtime.operators.schema.coordinator.SchemaRegistryRequestHandler.handleSchemaChangeRequest(SchemaRegistryRequestHandler.java:184)
	at org.apache.flink.cdc.runtime.operators.schema.coordinator.SchemaRegistry.lambda$handleCoordinationRequest$3(SchemaRegistry.java:273)
	... 4 more

We should applySchemaChange (where the route rule works) first and lenientize its result then. Or we may not be able to get evolved schema since tableId isn't routed.
@yuxiqian yuxiqian force-pushed the hotfix/route-with-lenient-mode branch from c768f75 to 85169e6 Compare August 29, 2024 05:24
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 contribution, LGTM

@yuxiqian yuxiqian force-pushed the hotfix/route-with-lenient-mode branch from fddc48a to 2aa81e0 Compare August 29, 2024 07:30
@yuxiqian yuxiqian changed the title [hotfix] Fix lenient schema evolution failure with route blocks [FLINK-36183] Fix lenient schema evolution failure with route blocks Aug 30, 2024
@ruanhang1993 ruanhang1993 merged commit 73977c1 into apache:master Aug 30, 2024
20 checks passed
qiaozongmi pushed a commit to qiaozongmi/flink-cdc that referenced this pull request Sep 23, 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.

3 participants