davidradl commented on code in PR #26219:
URL: https://github.com/apache/flink/pull/26219#discussion_r1975168566
##########
flink-runtime/src/main/java/org/apache/flink/streaming/runtime/tasks/mailbox/TaskMailboxImpl.java:
##########
@@ -243,11 +243,11 @@ private Mail takeOrNull(Deque<Mail> queue, int priority) {
@Override
public List<Mail> drain() {
- List<Mail> drainedMails = new ArrayList<>(batch);
- batch.clear();
Review Comment:
should we be eagerly grabbing the lock in all these methods so all
processing is done under the lock? for example all references to batch should
be under the lock as the value could change under us. I was thinking we could
synchronize all the methods referencing batch, so we do not need the lock.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]