You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/06/15 14:26:37 UTC

[GitHub] [pinot] siddharthteotia commented on pull request #8892: [BugFix] Avoid reporting negative values for server latency.

siddharthteotia commented on PR #8892:
URL: https://github.com/apache/pinot/pull/8892#issuecomment-1156544469

   Was just reading the code again. 
   
   If you are referring to the delay in the following callback/listener, then I can see it will affect the `requestSentLatency`.
   
   ```
   `_channel.writeAndFlush(Unpooled.wrappedBuffer(requestBytes)).addListener(f -> {
           long requestSentLatencyMs = System.currentTimeMillis() - startTimeMs;
           _brokerMetrics.addTimedTableValue(rawTableName, BrokerTimer.NETTY_CONNECTION_SEND_REQUEST_LATENCY,
               requestSentLatencyMs, TimeUnit.MILLISECONDS);
           asyncQueryResponse.markRequestSent(serverRoutingInstance, requestSentLatencyMs);
         });`
   ```
   
   However, `responseDelayMs` is computed from `_receiveDataTableTimeMs` and `_submitRequestTimeMs`. The latter one is computed outside the callback in the `QueryRouter` code which makes me wonder even if Netty slows a bit in invoking the above listener, it should not affect the `_submitRequestTimeMs` ?
   
   ```
   ` try {
           serverChannels.sendRequest(rawTableName, asyncQueryResponse, serverRoutingInstance, entry.getValue(),
               timeoutMs);
           asyncQueryResponse.markRequestSubmitted(serverRoutingInstance);
         }`
   ```
   
   


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

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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