yashmayya commented on code in PR #15069: URL: https://github.com/apache/pinot/pull/15069#discussion_r1957084417
########## pinot-core/src/main/java/org/apache/pinot/core/accounting/PerQueryCPUMemAccountantFactory.java: ########## @@ -278,8 +278,9 @@ public void updateQueryUsageConcurrently(String queryId) { */ @SuppressWarnings("ConstantConditions") public void sampleThreadCPUTime() { - if (_isThreadCPUSamplingEnabled) { - _threadLocalEntry.get()._currentThreadCPUTimeSampleMS = getThreadResourceUsageProvider().getThreadTimeNs(); + ThreadResourceUsageProvider provider = getThreadResourceUsageProvider(); + if (_isThreadCPUSamplingEnabled && provider != null) { + _threadLocalEntry.get()._currentThreadCPUTimeSampleMS = provider.getThreadTimeNs(); Review Comment: Should we add a log if `ThreadResourceUsageProvider` is unexpectedly `null` to help discover execution paths that haven't been instrumented? -- 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