Zakelly commented on code in PR #26416:
URL: https://github.com/apache/flink/pull/26416#discussion_r2034395547


##########
flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/ForStKeyedStateBackend.java:
##########
@@ -445,6 +445,22 @@ private <N, UK, SV> 
RegisteredKeyValueStateBackendMetaInfo<N, SV> updateRestored
 
         RegisteredKeyValueStateBackendMetaInfo<N, SV> restoredKvStateMetaInfo 
= oldStateInfo.f1;
 
+        // fetch current namespace serializer now because if it is 
incompatible, we can't access
+        // it anymore to improve the error message
+        TypeSerializer<N> previousNamespaceSerializer =
+                restoredKvStateMetaInfo.getNamespaceSerializer();
+
+        TypeSerializerSchemaCompatibility<N> s =
+                
restoredKvStateMetaInfo.updateNamespaceSerializer(namespaceSerializer);
+        if (s.isCompatibleAfterMigration() || s.isIncompatible()) {

Review Comment:
   @mayuehappy We could distinguish the messages for two cases. For the 
`isCompatibleAfterMigration`, we may say 'The new namespace serializer () can 
be compatible with the old one () after migration. But ForSt does not support 
state migration yet.'



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to