amrishlal commented on code in PR #9117:
URL: https://github.com/apache/pinot/pull/9117#discussion_r931704857
##########
pinot-core/src/main/java/org/apache/pinot/core/query/scheduler/QueryScheduler.java:
##########
@@ -237,6 +240,13 @@ protected byte[]
processQueryAndSerialize(ServerQueryRequest queryRequest, Execu
_serverMetrics.addTimedTableValue(tableNameWithType,
ServerTimer.TOTAL_CPU_TIME_NS, totalCpuTimeNs,
TimeUnit.NANOSECONDS);
}
+ if (queryHasMVSelectionOrderBy) {
+ _serverMetrics.addMeteredTableValue(tableNameWithType,
ServerMeter.QUERY_HAS_MV_SELECTION_ORDER_BY, 1);
+ }
+
+ // Remove the 'QUERY_HAS_MV_SELECTION_ORDER_BY' metadata from the
DataTable as the Broker does not need to know
+ // about this metadata or emit a metric related to it
+
dataTableMetadata.remove(MetadataKey.QUERY_HAS_MV_SELECTION_ORDER_BY.getName());
Review Comment:
Broker side metric is probably on overkill.
Server`InstanceRequestHandler.java` has a `requestId`, so if we add a log
message on the server something like "Request " + requestId + " has MV in ORDER
BY." This should make it very easy to pull out the query string from Broker
logs since the request id is same between server and broker. Although, the
current approach is fine too.
--
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]