flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhijiangW <...@git.apache.org>
Subject [GitHub] flink pull request #4509: [FLINK-7406][network] Implement Netty receiver inc...
Date Fri, 01 Dec 2017 08:11:35 GMT
Github user zhijiangW commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4509#discussion_r154286901
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java
---
    @@ -306,12 +306,10 @@ public void recycle(MemorySegment segment) {
     					ExceptionUtils.rethrow(t);
     				}
     			}
    -
    -			bufferQueue.addExclusiveBuffer(new Buffer(segment, this));
    -			floatingBufferRecycled = bufferQueue.maintainTargetSize(numRequiredBuffers);
    +			numAddedBuffers = bufferQueue.addExclusiveBuffer(new Buffer(segment, this), numRequiredBuffers);
     		}
     
    -		if (!floatingBufferRecycled && unannouncedCredit.getAndAdd(1) == 0) {
    +		if (numAddedBuffers > 0 && unannouncedCredit.getAndAdd(1) == 0) {
    --- End diff --
    
    Yes, you are right. I forgot to update the latter one. :)


---

Mime
View raw message