pnowojski commented on a change in pull request #8320: 
[FLINK-12201][network,metrics] Introduce InputGateWithMetrics in Task to 
increment numBytesIn metric
URL: https://github.com/apache/flink/pull/8320#discussion_r289283422
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java
 ##########
 @@ -566,9 +560,9 @@ private BufferOrEvent transformToBufferOrEvent(
                        Buffer buffer,
                        boolean moreAvailable,
                        InputChannel currentChannel) throws IOException, 
InterruptedException {
-               numBytesIn.inc(buffer.getSizeUnsafe());
+               final int size = buffer.getSizeUnsafe();
 
 Review comment:
   Hmm, it looks like we can drop `getSizeUnsafe()` method altogether, since it 
doesn't differ from `getSize()` - both are not synchronized (also like 
`setSize()`). It seems like I or @NicoK missed that when we were implementing 
low latency changes and dropping the synchronisation in the `Buffer` class. Or 
am I missing something?

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