flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From NicoK <...@git.apache.org>
Subject [GitHub] flink pull request #4509: [FLINK-7406][network] Implement Netty receiver inc...
Date Tue, 21 Nov 2017 14:49:50 GMT
Github user NicoK commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4509#discussion_r152252414
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java
---
    @@ -306,62 +314,79 @@ public void recycle(MemorySegment segment) {
     					ExceptionUtils.rethrow(t);
     				}
     			}
    -			availableBuffers.add(new Buffer(segment, this));
    +
    +			// Recycle one extra floating buffer to always maintain (senderBacklog + initialCredit)
buffers available.
    +			if (bufferQueue.getAvailableBufferSize() == numRequiredBuffers) {
    --- End diff --
    
    extract this into `AvailableBufferQueue#maintainTargetSize()`?


---

Mime
View raw message