-
Notifications
You must be signed in to change notification settings - Fork 13.4k
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-24858][core] Prevent version mismatches in TypeSerializers #17755
Conversation
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit 08dff35 (Wed Nov 10 13:58:39 UTC 2021) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
throws IOException { | ||
if (readOuterSnapshotVersion <= LAST_VERSION_WITHOUT_ROW_KIND) { | ||
supportsRowKind = false; | ||
} else if (readOuterSnapshotVersion == LAST_VERSION_WITHOUT_ROW_KIND + 1) { |
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 adding another new flag instead of LAST_VERSION_WITHOUT_ROW_KIND + 1
would be better to understand.
} | ||
|
||
@Override | ||
protected OuterSchemaCompatibility resolveOuterSchemaCompatibility( | ||
RowSerializer newSerializer) { | ||
if (readVersion <= LAST_VERSION_WITHOUT_ROW_KIND) { | ||
if (supportsRowKind == newSerializer.legacyModeEnabled) { |
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 we should better to add description to describe the relationship between supportsRowKind
with legacyModeEnabled
.
@Myasuka thanks for your review I reworked the |
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.
LGTM
Could you add an additional note in release notes of 1.14 to upgrade directly to 1.14.1 when migrating from 1.13? |
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 tried to come up with a different solution and ended up exactly like this. So gj :)
Before this commit some serializers handled the version information incorrectly in the corresponding serializer snapshot which could lead during eagerly instantiation that the wrong version of the serializer was used to deserialize the data.
What is the purpose of the change
Before this commit, some serializers handled the version information
incorrectly in the corresponding serializer snapshot which could lead
during eager instantiation that the wrong version of the serializer
was used to deserialize the data.
Brief change log
Verifying this change
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (yes / no)Documentation