Myasuka commented on a change in pull request #18391:
URL: https://github.com/apache/flink/pull/18391#discussion_r803795941



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/metadata/MetadataV2V3SerializerBase.java
##########
@@ -415,7 +440,7 @@ KeyedStateHandle deserializeKeyedStateHandle(
             int baseSize = dis.readInt();
             List<KeyedStateHandle> base = new ArrayList<>(baseSize);
             for (int i = 0; i < baseSize; i++) {
-                base.add(deserializeKeyedStateHandle(dis, context));
+                
base.add(Preconditions.checkNotNull(deserializeKeyedStateHandle(dis, context)));

Review comment:
       I prefer to throw exception here to act as a safety guard. Otherwise, if 
we take the slient exception here, we should at least add warnings.




-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to