vvivekiyer commented on code in PR #16164:
URL: https://github.com/apache/pinot/pull/16164#discussion_r2210874160
##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseSingleStageBrokerRequestHandler.java:
##########
@@ -652,6 +654,8 @@ protected BrokerResponse doHandleRequest(long requestId,
String query, SqlNodeAn
long routingEndTimeNs = System.nanoTime();
_brokerMetrics.addPhaseTiming(rawTableName, BrokerQueryPhase.QUERY_ROUTING,
routingEndTimeNs - routingStartTimeNs);
+ // Account the resource used for routing phase
+ Tracing.ThreadAccountantOps.sample();
Review Comment:
(nit) Prefer moving the sampling to the location where we compute phase
timing for each phase. That way it's evident that we want to sample each broker
phase.
##########
pinot-query-planner/src/main/java/org/apache/pinot/query/QueryEnvironment.java:
##########
@@ -273,6 +274,8 @@ public CompiledQuery compile(String sqlQuery,
SqlNodeAndOptions sqlNodeAndOption
queryNode = sqlNode;
}
RelRoot relRoot = compileQuery(queryNode, plannerContext);
+ // Accounts for resource usage of the compilation phase
+ Tracing.ThreadAccountantOps.sampleMSE();
Review Comment:
It doesn't look right to me. The QueryEnv.compile() happens in an async call
with a separate threadpool. We might have to find another way to account for
these async calls in MSE.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]