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


##########
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:
   I am wondering if we need to flag the offending query by sending the 
metadata to the broker and flagging the query in the broker log?. if the metric 
is hit, we can search the log, find the offending query, and ask the users to 
clean up these queries? If the mechanism is made generic enough, it could be 
used for other such usecases as well?



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

Reply via email to