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



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/state/IncrementalRemoteKeyedStateHandle.java
##########
@@ -204,6 +203,21 @@ public long getStateSize() {
         return size;
     }
 
+    @Override
+    public long getIncrementalStateSize() {
+        long size = StateUtil.getStateSize(metaStateHandle);
+
+        for (StreamStateHandle sharedStateHandle : sharedState.values()) {
+            size += sharedStateHandle.getIncrementalStateSize();

Review comment:
       I guess this only works because 
`PlaceholderStreamStateHandle.getIncrementalStateSize` returns `0`, right?
   But backend isn't requried to return placeholder IMO; in fact, it currently 
doesn't - without FLINK-25395/ #18297 (In the future, the latter PR quite 
likely will be reverted I think).
   
   WDYT about computing incremental state size externally (in 
`RocksIncrementalSnapshotStrategy`) and storing it in metadata?




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