tzulitai commented on a change in pull request #7580: [FLINK-11436] Fix Java
deserialization failure of the AvroSerializer
URL: https://github.com/apache/flink/pull/7580#discussion_r251268878
##########
File path:
flink-core/src/main/java/org/apache/flink/util/InstantiationUtil.java
##########
@@ -242,6 +243,10 @@ private static boolean isAnonymousClass(Class clazz) {
}
}
+ private static boolean isAvroSerializer(String name) {
Review comment:
I feel like we would be safer if we explicitly also check that
`localClassDescriptor.getSerialVersionUID() == 2 &&
streamClassDescriptor.getSerialVersionUID() == 1` here, because this is the
exact case that we're trying to be fault tolerant with.
Imagine the case where after every serializer was migrated, we updated the
`AvroSerializer` and upticked the version, but forgot to update the logic here.
Moreover, we should have a test to safeguard that we don't uptick the serial
version UID before all serializers are migrated.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services