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



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/HeapRestoreOperation.java
##########
@@ -201,11 +201,13 @@ private void readStateHandleStateData(
             long offset = groupOffset.f1;
 
             // Check that restored key groups all belong to the backend.

Review comment:
       I wonder whether this comment should still be kept.

##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/HeapRestoreOperation.java
##########
@@ -201,11 +201,13 @@ private void readStateHandleStateData(
             long offset = groupOffset.f1;
 
             // Check that restored key groups all belong to the backend.
-            Preconditions.checkState(
-                    keyGroupRange.contains(keyGroupIndex),
-                    "Key group %s doesn't belong to this backend with key 
group range: %s",
-                    keyGroupIndex,
-                    keyGroupRange);
+            if (!keyGroupRange.contains(keyGroupIndex)) {

Review comment:
       Currently, `HeapRestoreOperation.java` is both used for checkpoint and 
savepoint restore as they actually have the same format. Thus, shall we throw 
exception once this key group does not belong to current key group range during 
savepoint restore?




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

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


Reply via email to