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

    https://github.com/apache/flink/pull/6254#discussion_r201293862
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java
 ---
    @@ -594,22 +626,22 @@ public String getMessage() {
                }
     
                /**
    -            * Adds an exclusive buffer (back) into the queue and recycles 
one floating buffer if the
    +            * Adds an exclusive buffer (back) into the queue and removes 
one floating buffer if the
                 * number of available buffers in queue is more than the 
required amount.
                 *
                 * @param buffer The exclusive buffer to add
                 * @param numRequiredBuffers The number of required buffers
                 *
    -            * @return How many buffers were added to the queue
    +            * @return How many buffers were added to the queue (<tt>0</tt> 
or <tt>1</tt>) and the
    +            *         floating buffer which was removed and should be 
released (outside!)
                 */
    -           int addExclusiveBuffer(Buffer buffer, int numRequiredBuffers) {
    +           Tuple2<Integer, Optional<Buffer>> addExclusiveBuffer(Buffer 
buffer, int numRequiredBuffers) {
                        exclusiveBuffers.add(buffer);
                        if (getAvailableBufferSize() > numRequiredBuffers) {
    --- End diff --
    
    yes, this is not critical. Just thought of it to exchange with you! :)


---

Reply via email to