You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by pnowojski <gi...@git.apache.org> on 2018/05/03 14:39:00 UTC

[GitHub] flink pull request #5923: [FLINK-9253][network] make the maximum floating bu...

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

    https://github.com/apache/flink/pull/5923#discussion_r185817506
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/NetworkEnvironment.java ---
    @@ -228,20 +228,19 @@ public void setupPartition(ResultPartition partition) throws IOException {
     	@VisibleForTesting
     	public void setupInputGate(SingleInputGate gate) throws IOException {
     		BufferPool bufferPool = null;
    -		int maxNumberOfMemorySegments;
     		try {
     			if (enableCreditBased) {
    -				maxNumberOfMemorySegments = gate.getConsumedPartitionType().isBounded() ?
    -					extraNetworkBuffersPerGate : Integer.MAX_VALUE;
    -
     				// assign exclusive buffers to input channels directly and use the rest for floating buffers
    -				gate.assignExclusiveSegments(networkBufferPool, networkBuffersPerChannel);
    -				bufferPool = networkBufferPool.createBufferPool(0, maxNumberOfMemorySegments);
    +				int nrExclusiveMemorySegments = gate.assignExclusiveSegments(networkBufferPool, networkBuffersPerChannel);
    --- End diff --
    
    Please, no abbreviations like `nrExclusiveMemorySegments`. `assignedExclusiveMemorySegments`? `exclusiveMemorySegments`?


---