vvivekiyer opened a new pull request, #11715: URL: https://github.com/apache/pinot/pull/11715
In #9092, we added query execution stats to fetch setNumConsumingSegmentsProcessed and setNumConsumingSegmentsMatched In one of our production clusters, we observed that `Operator.getIndexSegment -> UnsupportedOperationException()` was consuming 8% of CPU. Analyzing it, the RCA is as follows: - Stats collection calls getIndexSegment() which is not implemented by all operators. - The default implementation throws an exception. - We simply catch the exception and do nothing The process of throwing an exception (needlessly in this case) is expensive CPU-wise because it collects a stack-trace (which is expensive and slow) amongst other things. Some benchmarking [here](https://www.baeldung.com/java-exceptions-performance). Attaching flamegraph that shows CPU usage  -- 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-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org