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/07/27 22:40:47 UTC

[GitHub] [pinot] somandal commented on a diff in pull request #9117: Emit a server side metric to identify if MV columns are present as part of the selection order by queries

somandal commented on code in PR #9117:
URL: https://github.com/apache/pinot/pull/9117#discussion_r931636725


##########
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:
   Thanks for the suggestion! What do you mean by flagging the query on the Broker side? 
   
   @siddharthteotia and I did discuss whether we need a Broker side metric for this before opening the PR. We can always look for the metric on the servers and check the server logs for the broker and check the queries coming in at the time on the Broker side to identify what these queries are. So we didn't think it was necessary to add a metric on the Broker side too. Let me know if you think there are other advantages of adding this on the Broker side 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: 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