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



##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/mailbox/MailboxProcessor.java
##########
@@ -249,25 +259,34 @@ private void sendControlMail(RunnableWithException mail, 
String descriptionForma
        }
 
        /**
-        * This helper method handles all special actions from the mailbox. It 
returns true if the mailbox loop should
-        * continue running, false if it should stop. In the current design, 
this method also evaluates all control flag
-        * changes. This keeps the hot path in {@link #runMailboxLoop()} free 
from any other flag checking, at the cost
+        * This helper method handles all special actions from the mailbox.
+        * In the current design, this method also evaluates all control flag 
changes.
+        * This keeps the hot path in {@link #runMailboxLoop()} free from any 
other flag checking, at the cost
         * that all flag changes must make sure that the mailbox signals 
mailbox#hasMail.
+        *
+        * @return true if a mail has been processed.
         */
-       private boolean processMail(TaskMailbox mailbox) throws Exception {
-
+       private boolean processMail(TaskMailbox mailbox, boolean singleStep) 
throws Exception {
+               boolean processed = false;
                // Doing this check is an optimization to only have a volatile 
read in the expected hot path, locks are only
                // acquired after this point.
                if (!mailbox.createBatch()) {
                        // We can also directly return true because all changes 
to #isMailboxLoopRunning must be connected to
                        // mailbox.hasMail() == true.
-                       return true;
+                       return processed;

Review comment:
       I wanted to make it consistent, but I don't care much one way or 
another. Changed to `return false`




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