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



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/state/StateObject.java
##########
@@ -63,4 +63,14 @@
      * @return Size of the state in bytes.
      */
     long getStateSize();
+
+    /**
+     * Returns the incremental state size in bytes. If the size is unknown, 
this method would return
+     * same result as {@link #getStateSize()}.
+     *
+     * @return Size of incremental state in bytes.
+     */
+    default long getIncrementalStateSize() {
+        return getStateSize();
+    }

Review comment:
       Do we? Default implementation allows to forget to implement it, and 
that's probably the case with `SubtaskState`, isn't it?
   
   The interface `CompositeStateHandle` is a bit broken I think because it 
combines:
   a) marking composites and
   b) registering shared states
   Which are not directly related (so it should probably be split into two)
   
   So to me the less invasive and safe change is to move the method to 
`CompositeStateHandle` but remove `default`.




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