Jiayi-Liao commented on a change in pull request #10068:
URL: https://github.com/apache/flink/pull/10068#discussion_r422127101



##########
File path: 
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/typeutils/BinaryGenericSerializer.java
##########
@@ -127,63 +133,41 @@ public int hashCode() {
 
        @Override
        public TypeSerializerSnapshot<BinaryGeneric<T>> snapshotConfiguration() 
{
-               return new BinaryGenericSerializerSnapshot<>(serializer);
+               return new BinaryGenericSerializerSnapshot<>(this);
+       }
+
+       public TypeSerializer<T> getInnerSerializer() {
+               return serializer;
        }
 
        /**
         * {@link TypeSerializerSnapshot} for {@link BinaryGenericSerializer}.
         */
-       public static final class BinaryGenericSerializerSnapshot<T> implements 
TypeSerializerSnapshot<BinaryGeneric<T>> {
-               private static final int CURRENT_VERSION = 3;
-
-               private TypeSerializer<T> previousSerializer;
+       public static final class BinaryGenericSerializerSnapshot<T> extends 
CompositeTypeSerializerSnapshot<BinaryGeneric<T>, BinaryGenericSerializer<T>> {

Review comment:
       Since the type of snapshot is changed, is this a break change to 
existing checkpoint? @dawidwys @wuchong @JingsongLi 
   
   ```
   Caused by: java.io.IOException: Corrupt data, magic number mismatch. 
Expected    de704, found aced0005
        at 
org.apache.flink.api.common.typeutils.CompositeTypeSerializerSnapshot.internalReadOuterSnapshot(CompositeTypeSerializerSnapshot.java:297)
        at 
org.apache.flink.api.common.typeutils.CompositeTypeSerializerSnapshot.readSnapshot(CompositeTypeSerializerSnapshot.java:145)
        at 
org.apache.flink.api.common.typeutils.TypeSerializerSnapshot.readVersionedSnapshot(TypeSerializerSnapshot.java:174)
        at 
org.apache.flink.api.common.typeutils.NestedSerializersSnapshotDelegate.readNestedSerializerSnapshots(NestedSerializersSnapshotDelegate.java:182)
        at 
org.apache.flink.table.runtime.typeutils.BaseRowSerializer$BaseRowSerializerSnapshot.readSnapshot(BaseRowSerializer.java:315)
        at 
org.apache.flink.api.common.typeutils.TypeSerializerSnapshot.readVersionedSnapshot(TypeSerializerSnapshot.java:174)
        at 
org.apache.flink.api.common.typeutils.TypeSerializerSnapshotSerializationUtil$TypeSerializerSnapshotSerializationProxy.deserializeV2(TypeSerializerSnapshotSerializationUtil.java:179)
        at 
org.apache.flink.api.common.typeutils.TypeSerializerSnapshotSerializationUtil$TypeSerializerSnapshotSerializationProxy.read(TypeSerializerSnapshotSerializationUtil.java:150)
        at 
org.apache.flink.api.common.typeutils.TypeSerializerSnapshotSerializationUtil.readSerializerSnapshot(TypeSerializerSnapshotSerializationUtil.java:76)
        at 
org.apache.flink.runtime.state.metainfo.StateMetaInfoSnapshotReadersWriters$CurrentReaderImpl.readStateMetaInfoSnapshot(StateMetaInfoSnapshotReadersWriters.java:219)
        at 
org.apache.flink.runtime.state.KeyedBackendSerializationProxy.read(KeyedBackendSerializationProxy.java:169)
        at 
org.apache.flink.runtime.state.heap.HeapRestoreOperation.restore(HeapRestoreOperation.java:134)
        at 
org.apache.flink.runtime.state.heap.HeapKeyedStateBackendBuilder.build(HeapKeyedStateBackendBuilder.java:114)
        ... 12 more
   ```




----------------------------------------------------------------
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.

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


Reply via email to