Github user NicoK commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4509#discussion_r143424259
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java
 ---
    @@ -306,10 +311,27 @@ public void recycle(MemorySegment segment) {
                                        ExceptionUtils.rethrow(t);
                                }
                        }
    +
    +                   // Recycle the extra floating buffers in order not to 
stack up 2*initialCredit
    +                   // buffers once current backlog is 0
    +                   if (senderBacklog.get() == 0 && availableBuffers.size() 
>= initialCredit) {
    --- End diff --
    
    This behaviour, i.e. sticking to `senderBacklog.get() + initialCredit` 
buffers in any case, should then also receive verification via a unit test :)


---

Reply via email to