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


##########
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:
   @Zakelly Thanks for the reply. As I remember, `NamespaceSerializer` should 
not support migration, even RocksdbStateBackend does. So do we still need to 
distinguish here?
   
   



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