You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/05/08 13:28:20 UTC

[GitHub] [flink] StefanRRichter commented on a change in pull request #8361: [FLINK-12434][network] Replace listeners with CompletableFuture in InputGates

StefanRRichter 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_r282023881
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java
 ##########
 @@ -551,21 +551,20 @@ public void requestPartitions() throws IOException, InterruptedException {
 				}
 
 				currentChannel = inputChannelsWithData.remove();
-				enqueuedInputChannelsWithData.clear(currentChannel.getChannelIndex());
+
+				result = currentChannel.getNextBuffer();
+
+				if (result.isPresent() && result.get().moreAvailable()) {
+					// enqueue the currentChannel at the end to avoid starvation
 
 Review comment:
   Nit: if we split the if, we can already add a `break` here and avoid checking  `!result.isPresent()` again in the loop.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services