rkhachatryan commented on a change in pull request #18391:
URL: https://github.com/apache/flink/pull/18391#discussion_r803675720



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/metadata/MetadataV2V3SerializerBase.java
##########
@@ -298,19 +306,24 @@ void serializeKeyedStateHandle(KeyedStateHandle 
stateHandle, DataOutputStream do
             if (stateHandle instanceof KeyGroupsSavepointStateHandle) {
                 dos.writeByte(SAVEPOINT_KEY_GROUPS_HANDLE);
             } else {
-                dos.writeByte(KEY_GROUPS_HANDLE);
+                dos.writeByte(KEY_GROUPS_HANDLE_V2);
             }
             
dos.writeInt(keyGroupsStateHandle.getKeyGroupRange().getStartKeyGroup());
             
dos.writeInt(keyGroupsStateHandle.getKeyGroupRange().getNumberOfKeyGroups());
             for (int keyGroup : keyGroupsStateHandle.getKeyGroupRange()) {
                 
dos.writeLong(keyGroupsStateHandle.getOffsetForKeyGroup(keyGroup));
             }
             
serializeStreamStateHandle(keyGroupsStateHandle.getDelegateStateHandle(), dos);
+
+            // savepoint state handle would not need to persist state handle 
id out.
+            if (!(stateHandle instanceof KeyGroupsSavepointStateHandle)) {
+                dos.writeUTF(stateHandle.getStateHandleId().toString());
+            }

Review comment:
       Indeed, that's an additional complexity.
   Thanks for clarifying.




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