You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/01/14 08:07:33 UTC

[GitHub] [flink] Myasuka commented on a change in pull request #18324: [FLINK-25557][checkpoint] Introduce incremental/full checkpoint size stats

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



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/changelog/ChangelogStateBackendHandle.java
##########
@@ -113,6 +124,19 @@ public long getStateSize() {
                     + nonMaterialized.stream().mapToLong(StateObject::getStateSize).sum();
         }
 
+        @Override
+        public long getIncrementalStateSize() {
+            long incrementalStateSize =
+                    incrementalMaterializeSize == undefinedIncrementalMaterializeSize
+                            ? materialized.stream()
+                                    .mapToLong(StateObject::getIncrementalStateSize)
+                                    .sum()
+                            : incrementalMaterializeSize;

Review comment:
       I prefer the 2nd option and I actually caulcate it in this way. Actually, the `incrementalMaterializeSize` would not always be computed each time. `ChangelogKeyedStateBackend` would hold `lastCompletedHandles` and leverage that to caculate the incremental state size.




-- 
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-unsubscribe@flink.apache.org

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