Aitozi commented on a change in pull request #8559: [FLINK-12576][Network,
Metrics]Take localInputChannel into account when compute inputQueueLength
URL: https://github.com/apache/flink/pull/8559#discussion_r299934633
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java
##########
@@ -273,6 +273,8 @@ public int getNumberOfQueuedBuffers() {
for (InputChannel channel :
inputChannels.values()) {
if (channel instanceof
RemoteInputChannel) {
totalBuffers +=
((RemoteInputChannel) channel).getNumberOfQueuedBuffers();
+ } else if (channel instanceof
LocalInputChannel) {
Review comment:
A question here: At the aspect of metric method, should we use synchronized
method to get the accurate number? Because I see some method use the
unsynchronized but still some directly work with synchronize like this
`((RemoteInputChannel) channel).getNumberOfQueuedBuffers();` . So is there some
principles on this @zhijiangW @pnowojski .
I'm in favour of working with synchronized, because the accurate metric will
be more convictive . But I'm not sure about the performance impact. Waiting for
you guys opinions. Thanks.
----------------------------------------------------------------
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