Grzegorz Liter
10/23/2023, 3:44 PM@Override
public TypeSerializer<SessionTimeWindow> getWindowSerializer(ExecutionConfig executionConfig) {
return Types.POJO(SessionTimeWindow.class).createSerializer(new ExecutionConfig());
}
Unfortunately there is an issue with schema evolution of this state.
org.apache.flink.util.StateMigrationException: The new namespace serializer (org.apache.flink.api.java.typeutils.runtime.PojoSerializer@e18e3041) must be compatible with the old namespace serializer (org.apache.flink.api.java.typeutils.runtime.PojoSerializer@97bf27ff).
after debugging that I found out that in org.apache.flink.contrib.streaming.state.RocksDBKeyedStateBackend#updateRestoredStateMetaInfo
TypeSerializerSchemaCompatibility<N> s =
restoredKvStateMetaInfo.updateNamespaceSerializer(namespaceSerializer);
if (s.isCompatibleAfterMigration() || s.isIncompatible()) {
throw new StateMigrationException(
the updateNamespaceSerializer does return Type.COMPATIBLE_AFTER_MIGRATION which is like I would expect but then why it is written in a way that compatible migratable state still throws a StateMigrationException?
What am I missing?