pnowojski commented on a change in pull request #8361: [FLINK-12434][network]
Replace listeners with CompletableFuture in InputGates
URL: https://github.com/apache/flink/pull/8361#discussion_r282109817
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/UnionInputGate.java
##########
@@ -159,14 +159,28 @@ public void requestPartitions() throws IOException,
InterruptedException {
@Override
public Optional<BufferOrEvent> getNextBufferOrEvent() throws
IOException, InterruptedException {
+ return getNextBufferOrEvent(true);
+ }
+
+ @Override
+ public Optional<BufferOrEvent> pollNextBufferOrEvent() throws
IOException, InterruptedException {
Review comment:
I checked and now I remembered. When I was adding `pollNextBufferOrEvent` I
tried to get rid of `InterruptedException`, but it comes not only from the
blocking implementation, but also from `SpilledSubpartitionView#getNextBuffer`
(or `SpillableSubpartitionView`) and it's `bufferPool.requestBufferBlocking();`
call. So this method is polling next record if it's available, but can still
block in some cases (not pipelined sub-partitions) if we are waiting for memory
to be released. I guess this should be added to the method's java doc.
I wonder if this affects the mailbox model.
----------------------------------------------------------------
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