zhijiangW commented on a change in pull request #9717: [FLINK-14044] [runtime] Reducing synchronization in AsyncWaitOperator URL: https://github.com/apache/flink/pull/9717#discussion_r327954640
########## File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/async/queue/OrderedStreamElementQueue.java ########## @@ -143,88 +92,31 @@ public int size() { } @Override - public <T> void put(StreamElementQueueEntry<T> streamElementQueueEntry) throws InterruptedException { - lock.lockInterruptibly(); - - try { - while (queue.size() >= capacity) { - notFull.await(); - } + public Optional<ResultFuture<OUT>> tryPut(StreamElement streamElement) { + if (queue.size() < capacity) { + StreamElementQueueEntry queueEntry = createEntry(streamElement); Review comment: `StreamElementQueueEntry<OUT> queueEntry` to avoid unchecked. ---------------------------------------------------------------- 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