pnowojski commented on a change in pull request #10009: [FLINK-14304] Avoid task starvation with mailbox URL: https://github.com/apache/flink/pull/10009#discussion_r342970858
########## File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/mailbox/TaskMailboxImpl.java ########## @@ -77,22 +112,30 @@ public boolean hasMail() { @Override public Optional<Mail> tryTake(int priority) throws IllegalStateException { + Optional<Mail> head = tryTakeFromBatch(); Review comment: Ok, but in that case: - please add a comment about this contract somewhere in this class - and either please add an ITCase coverage for the case when two operators are ping ponging themselves with adding mails and yielding, which will test that `tryTake` & `take` do not expand the batch. - or add additional comment inside the existing unit test, why is it testing for that contract ---------------------------------------------------------------- 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 With regards, Apache Git Services