[
https://issues.apache.org/jira/browse/FLINK-6600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16013889#comment-16013889
]
ASF GitHub Bot commented on FLINK-6600:
---------------------------------------
Github user StefanRRichter commented on a diff in the pull request:
https://github.com/apache/flink/pull/3925#discussion_r116977867
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/HeapKeyedStateBackend.java
---
@@ -385,6 +386,19 @@ private void
restorePartitionedState(Collection<KeyedStateHandle> state) throws
serializationProxy.read(inView);
+ // check for key serializer compatibility; this
also reconfigures the
+ // key serializer to be compatible, if it is
required and is possible
+ if
(StateMigrationUtil.resolveCompatibilityResult(
+
serializationProxy.getKeySerializer(),
+
TypeSerializerSerializationProxy.ClassNotFoundDummyTypeSerializer.class,
+
serializationProxy.getKeySerializerConfigSnapshot(),
+ (TypeSerializer) keySerializer)
+ .isRequiresMigration()) {
+
+ throw new RuntimeException("The new key
serializer is not compatible to read previous keys. " +
--- End diff --
Same here.
> Add key serializer's config snapshot to KeyedBackendSerializationProxy
> ----------------------------------------------------------------------
>
> Key: FLINK-6600
> URL: https://issues.apache.org/jira/browse/FLINK-6600
> Project: Flink
> Issue Type: Improvement
> Components: State Backends, Checkpointing
> Reporter: Tzu-Li (Gordon) Tai
> Assignee: Tzu-Li (Gordon) Tai
> Fix For: 1.3.0, 1.4.0
>
>
> Currently, only the key serializer is included in what's written for a keyed
> state backend in checkpoints. The namespace and state serializer already have
> their config snapshots included in the individual registered state's metainfo.
> We should also include the configuration snapshot of the key serializer in
> {{KeyedBackendSerializationProxy}} so that we can also be flexible in
> allowing migration / transformation of the key in the future.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)