zhijiangW commented on a change in pull request #8455: 
[FLINK-12284][Network,Metrics]Fix the incorrect inputBufferUsage metric in 
credit-based network mode
URL: https://github.com/apache/flink/pull/8455#discussion_r288852908
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/NetworkEnvironment.java
 ##########
 @@ -328,7 +332,17 @@ private void registerInputMetrics(MetricGroup inputGroup, 
MetricGroup buffersGro
                        InputGateMetrics.registerQueueLengthMetrics(inputGroup, 
inputGates);
                }
                buffersGroup.gauge(METRIC_INPUT_QUEUE_LENGTH, new 
InputBuffersGauge(inputGates));
-               buffersGroup.gauge(METRIC_INPUT_POOL_USAGE, new 
InputBufferPoolUsageGauge(inputGates));
+
+               if (config.isCreditBased()) {
 
 Review comment:
   For exclusive case there is no buffer pool actually. So maybe we could break 
down the new class names into `ExclusiveBuffersUsageGauge`, 
`FloatingBuffersUsageGauge`, `InputBuffersUsageGauge` instead?
   
   But considering the metric name compatibility with before, we might still 
use `METRIC_INPUT_POOL_USAGE` in credit-based mode to correspond with 
`InputBuffersUsageGauge`.

----------------------------------------------------------------
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

Reply via email to