flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] zhijiangW commented on a change in pull request #7579: [FLINK-9142] Lower the minimum number of buffers for incoming channels to 1
Date Wed, 06 Mar 2019 10:58:54 GMT
zhijiangW commented on a change in pull request #7579: [FLINK-9142] Lower the minimum number
of buffers for incoming channels to 1
URL: https://github.com/apache/flink/pull/7579#discussion_r262889178
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/NetworkEnvironment.java
 ##########
 @@ -264,11 +264,15 @@ public void setupInputGate(SingleInputGate gate) throws IOException
{
 		int maxNumberOfMemorySegments;
 		try {
 			if (enableCreditBased) {
+				Preconditions.checkArgument(networkBuffersPerChannel > 0,
+					"In credit-based flow control mode, networkBuffersPerChannel must be configured greater
than 0.");
 				maxNumberOfMemorySegments = gate.getConsumedPartitionType().isBounded() ?
-					extraNetworkBuffersPerGate : Integer.MAX_VALUE;
+					gate.getNumberOfInputChannels() * (networkBuffersPerChannel - 1) +
 
 Review comment:
   I think we should not change the setting behaviors internally. Otherwise the users might
not be aware of this. 
   
   The motivation of this ticket is decreasing the default value for per-channel config. But
if users want to config this value explicitly, we should obey it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message