pnowojski commented on a change in pull request #9383: [FLINK-13248] [runtime]
Adding processing of downstream messages in AsyncWaitOperator's wait loops
URL: https://github.com/apache/flink/pull/9383#discussion_r314316038
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/async/AsyncWaitOperator.java
##########
@@ -402,8 +402,10 @@ private void stopResources(boolean waitForShutdown)
throws InterruptedException
pendingStreamElementQueueEntry = streamElementQueueEntry;
while (!queue.tryPut(streamElementQueueEntry)) {
+ yieldToDownstream();
+ // wait for the emitter thread to output the remaining
elements
// we wait for the emitter to notify us if the queue
has space left again
- checkpointingLock.wait();
+ checkpointingLock.wait(1);
Review comment:
why `.wait(1)`?
I would be expecting more or less the same code as Stefan R proposed in his
version, but encapsulated/hidden from the user in `yieldToDownstream()`. Check
my comment here: https://github.com/apache/flink/pull/9426#discussion_r314195257
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services