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 Tue, 10 Oct 2017 09:53:11 GMT
Github user zhijiangW commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4509#discussion_r143680178
  
    --- 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 --
    
    Yes, I understand your point. 
    I only considered recycling extra floating buffers when no backlog in sender before, actually
it is more reasonable to check and recycle extra floating buffer after every exclusive buffer
returned.


---

Mime
View raw message