pnowojski commented on a change in pull request #14573:
URL: https://github.com/apache/flink/pull/14573#discussion_r553268577



##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/mailbox/MailboxDefaultAction.java
##########
@@ -59,6 +60,16 @@
          * Calling this method signals that the mailbox-thread should 
(temporarily) stop invoking
          * the default action, e.g. because there is currently no input 
available. This method must
          * be invoked from the mailbox-thread only!
+         *
+         * @param suspensionIdleTimer started (ticking) {@link TimerGauge} 
that measures how long
+         *     the default action was suspended/idling. If mailbox loop is 
busy processing mails,
+         *     this timer should be paused for the time required to process 
the mails.
+         */
+        Suspension suspendDefaultAction(TimerGauge suspensionIdleTimer);
+
+        /**
+         * Same as {@link #suspendDefaultAction(TimerGauge)} but without any 
associated timer
+         * measuring the idle time.
          */
         Suspension suspendDefaultAction();

Review comment:
       Maybe. I'm not sure if we will have some other use cases in the future. 
Current contract is that if you started measuring some idle time before the 
`suspendDefaultAction` call, you should pass the timer. If not, then you can 
not pass anything, so the `suspendDefaultAction()` version might be useful. I 
would keep it as it is without deprecating. Also it's not that this decision 
matters a lot, nobody besides us (task runtime developers) is using this API :)




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to