pnowojski commented on code in PR #21201:
URL: https://github.com/apache/flink/pull/21201#discussion_r1012843857


##########
flink-core/src/main/java/org/apache/flink/api/common/typeutils/TypeSerializerSnapshotSerializationUtil.java:
##########
@@ -145,8 +140,12 @@ public void read(DataInputView in) throws IOException {
                     serializerSnapshot = deserializeV2(in, 
userCodeClassLoader);
                     break;
                 case 1:
-                    serializerSnapshot = deserializeV1(in, 
userCodeClassLoader, serializer);
-                    break;
+                    throw new IOException(
+                            String.format(
+                                    "No longer supported version [%d] for 
TypeSerializerSnapshot. "
+                                            + "Please migrate away from the 
old TypeSerializerConfigSnapshot "
+                                            + "and use Flink 1.16 for the 
migration",
+                                    version));

Review Comment:
   I got rid of the "Ops, this should not happen...".  Per offline discussion 
we decided to keep this error message, but to reimplement it using 
`getCompatibleVersions` instead.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to