siddharthteotia commented on a change in pull request #6936:
URL: https://github.com/apache/incubator-pinot/pull/6936#discussion_r636519034



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/transport/ServerChannels.java
##########
@@ -144,7 +148,12 @@ synchronized void sendRequest(InstanceRequest 
instanceRequest)
             System.currentTimeMillis() - startTime);
       }
       byte[] requestBytes = _serializer.serialize(instanceRequest);
-      _channel.writeAndFlush(Unpooled.wrappedBuffer(requestBytes), 
_channel.voidPromise());
+      long sendRequestStartTimeMs = System.currentTimeMillis();
+      
_channel.writeAndFlush(Unpooled.wrappedBuffer(requestBytes)).addListener(f -> {
+        _brokerMetrics.addTimedTableValue(rawTableName, 
BrokerTimer.NETTY_CONNECTION_SEND_REQUEST_LATENCY,
+            (System.currentTimeMillis() - sendRequestStartTimeMs), 
TimeUnit.MILLISECONDS);
+        asyncQueryResponse.markRequestSent(serverRoutingInstance);

Review comment:
       You probably don't need to do markRequestSent. 




-- 
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to