klion26 commented on a change in pull request #8122: [FLINK-12121] [State
Backends] Use composition instead of inheritance for the InternalKeyContext
logic in backend
URL: https://github.com/apache/flink/pull/8122#discussion_r273300375
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/HeapRestoreOperation.java
##########
@@ -143,6 +143,7 @@ public Void restore() throws Exception {
}
keySerializerRestored = true;
+
keyContext.setCurrentKeySerializer(keySerializerProvider.currentSchemaSerializer());
Review comment:
When initializing keyContext In `HeapKeyedStateBackendBuilder`, we have set
the serializer, why do we need to set serializer here again?
If we do not need to update serializer here, can we remove the
`setCurrentKeySerializer` method and mark `currentKeySerializer` as final in
`InternalKeyContextImpl`?
----------------------------------------------------------------
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]
With regards,
Apache Git Services