tzulitai commented on a change in pull request #6467: [FLINK-9887] Ensure
serializer upgrades work with timer service remake
URL: https://github.com/apache/flink/pull/6467#discussion_r207163983
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/HeapKeyedStateBackend.java
##########
@@ -188,6 +189,34 @@ public HeapKeyedStateBackend(
final HeapPriorityQueueSnapshotRestoreWrapper existingState =
registeredPQStates.get(stateName);
if (existingState != null) {
+ // TODO we implement the simple way of supporting the
current functionality, mimicking keyed state
+ // because this should be reworked in FLINK-9376 and
then we should have a common algorithm over
+ // StateMetaInfoSnapshot that avoids this code
duplication.
+ StateMetaInfoSnapshot restoredMetaInfoSnapshot =
+
restoredStateMetaInfo.get(StateUID.of(stateName,
StateMetaInfoSnapshot.BackendStateType.PRIORITY_QUEUE));
+
+ Preconditions.checkState(
+ restoredMetaInfoSnapshot != null,
+ "Requested to check compatibility of a restored
RegisteredKeyedBackendStateMetaInfo," +
+ " but its corresponding restored
snapshot cannot be found.");
+
+ StateMetaInfoSnapshot.CommonSerializerKeys
serializerKey =
+
StateMetaInfoSnapshot.CommonSerializerKeys.VALUE_SERIALIZER;
Review comment:
Do we already check the compatibility of the key serializer somewhere?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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