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


##########
flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/HeapKeyedStateBackend.java:
##########
@@ -163,6 +170,32 @@ 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 {
+        
Preconditions.checkState(createdKVStates.containsKey(stateDescriptor.getName()));
+        registeredKVStates.computeIfPresent(
+                stateDescriptor.getName(),
+                (stateName, stateTable) -> {
+                    stateTable.setMetaInfo(
+                            new RegisteredKeyValueStateBackendMetaInfo<>(
+                                    stateTable.getMetaInfo().snapshot()));
+                    return stateTable;

Review Comment:
   I agree, looks like it's a pre-existing issue. And FLINK-26853 also seems to 
be related.
   
   I'd open a separate ticket for that and mention it here, in the comment, 
WDYT? 
   



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