rkhachatryan commented on a change in pull request #16510:
URL: https://github.com/apache/flink/pull/16510#discussion_r676847436



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/state/SnapshotResult.java
##########
@@ -116,6 +116,14 @@ public long getStateSize() {
         return jobManagerOwnedSnapshot != null ? 
jobManagerOwnedSnapshot.getStateSize() : 0L;
     }
 
+    @Override
+    public <E extends Exception> void accept(StateObjectVisitor<E> visitor) 
throws E {
+        if (jobManagerOwnedSnapshot != null) {
+            jobManagerOwnedSnapshot.accept(visitor);
+        }

Review comment:
       I think you are right, will add `taskLocalSnapshot` too.
   
   (I wasn't sure because `taskLocalSnapshot` shouldn't take part for example 
in size calculation. However, this should be a concern of a specific visitor 
and it would be more clear to follow the contract of `accept()` here of 
visiting all children)




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