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:
[email protected]
With regards,
Apache Git Services