tzulitai 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_r273343858
########## 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: I have the feeling that the 2 separate places to call `setCurrentKeySerializer` (first when it is initialized in the builder, as well as here) is going to a bit error prone in the future as the dependency is very fragile. Maybe the way to go is actually to let the `InternalKeyContextImpl` wrap the `StateSerializerProvider`, so that the handling of the serializer reconfiguration is handled in the context already? 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services