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



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/state/StateUtil.java
##########
@@ -70,9 +70,11 @@ public static void bestEffortDiscardAllStateObjects(
      *
      * @param stateFuture to be discarded
      * @throws Exception if the discard operation failed
+     * @return the size of state before cancellation (if available)
      */
-    public static void discardStateFuture(Future<? extends StateObject> 
stateFuture)
+    public static long discardStateFuture(Future<? extends StateObject> 
stateFuture)
             throws Exception {
+        long stateSize = 0;

Review comment:
       It would be problematic to combine `-1` with valid values.
   I think we should just mention in the docs that this number is best effort 
if checkpoint isn't completed.




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

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


Reply via email to