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_r341157710
########## 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: shouldn't the `tryTake` and `take` methods call `createBatch()` if `tryTakeFromBatch` returned `Optional.empty()`? Why do we allow for non batched takes? Shouldn't we have just `tryTakeFromBatch` and `takeFromBatch`? ---------------------------------------------------------------- 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