beliefer commented on code in PR #26469: URL: https://github.com/apache/flink/pull/26469#discussion_r2046564313
########## flink-runtime/src/main/java/org/apache/flink/streaming/runtime/tasks/mailbox/TaskMailboxImpl.java: ########## @@ -96,37 +96,26 @@ public boolean hasMail() { return !batch.isEmpty() || hasNewMail; } - @Override - public int size() { - final ReentrantLock lock = this.lock; - lock.lock(); - try { - return batch.size() + queue.size(); - } finally { - lock.unlock(); - } - } - @Override public Optional<Mail> tryTake(int priority) { checkIsMailboxThread(); checkTakeStateConditions(); - Mail head = takeOrNull(batch, priority); - if (head != null) { - return Optional.of(head); + Mail headEmail = takeOrNull(batch, priority); + if (headEmail != null) { + return Optional.of(headEmail); Review Comment: `head` -> `headEmail`. The latter is a better variable name. Some code uses `headEmail` and other uses `head` before this PR. We should unify the name. -- 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. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org