NicoK commented on a change in pull request #5381: [FLINK-8523][network] Stop 
assigning floating buffers for blocked input channels in exactly-once mode
URL: https://github.com/apache/flink/pull/5381#discussion_r205572300
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java
 ##########
 @@ -360,8 +360,9 @@ public boolean notifyBufferAvailable(Buffer buffer) {
 
                        // Important: double check the isReleased state inside 
synchronized block, so there is no
                        // race condition when notifyBufferAvailable and 
releaseAllResources running in parallel.
-                       if (isReleased.get() || 
bufferQueue.getAvailableBufferSize() >= numRequiredBuffers) {
+                       if (isReleased.get() || isBlocked() || 
bufferQueue.getAvailableBufferSize() >= numRequiredBuffers) {
 
 Review comment:
   Indeed, the "blocked" credits should be in `numRequiredBuffers` which was 
updated with the last buffer that we received. Any update on that will come 
with the next buffer. We just need to make sure that we acknowledge the newly 
freed credit to the sender (the backlog may be 0).
   
   The request for floating buffers should remain fair among all channels 
though and therefore we cannot request all floating buffers to satisfy that 
need at once!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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

Reply via email to