masteryhx commented on code in PR #19679:
URL: https://github.com/apache/flink/pull/19679#discussion_r934218899


##########
flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/HeapKeyedStateBackend.java:
##########
@@ -163,6 +169,34 @@ KeyGroupedInternalPriorityQueue<T> create(
         return priorityQueuesManager.createOrUpdate(stateName, 
byteOrderedElementSerializer);
     }
 
+    @Override
+    public <N, SV, SEV, S extends State, IS extends S> IS upgradeKeyedState(
+            TypeSerializer<N> namespaceSerializer,
+            StateDescriptor<S, SV> stateDescriptor,
+            @Nonnull StateSnapshotTransformFactory<SEV> 
snapshotTransformFactory)
+            throws Exception {
+        IS state =
+                createInternalState(namespaceSerializer, stateDescriptor, 
snapshotTransformFactory);
+        // rebuild metaInfo which created from previous snapshot to make it 
can continue to migrate

Review Comment:
   I have added the comment into the 
`RegisteredStateMetaInfoBase#withSerializerUpgradesAllowed` which will be used  
in `createInternalState` and `create`.



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