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



##########
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:
       1. Conceptually, incremental state is only relevant to 
`CompositeStateHandle` (which defines `registerSharedStates` method). WDYT 
about moving this method there?
   2. Then we could force non-default implementation
   3. In javadoc, could you clarify what "incremental" means (as per [comment 
above](https://github.com/apache/flink/pull/18324#discussion_r784298983))
   4. In javadoc, could you clarify the relation to channel state? Or maybe in 
some other place, like `OperatorSubtaskState`




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to