praveenc7 commented on code in PR #16164:
URL: https://github.com/apache/pinot/pull/16164#discussion_r2219891142


##########
pinot-core/src/main/java/org/apache/pinot/core/plan/maker/InstancePlanMakerImplV2.java:
##########
@@ -305,6 +306,8 @@ private void applyQueryOptions(QueryContext queryContext) {
   @Override
   public PlanNode makeSegmentPlanNode(SegmentContext segmentContext, 
QueryContext queryContext) {
     rewriteQueryContextWithHints(queryContext, 
segmentContext.getIndexSegment());
+    // Sample to track usage of query planning, since it can be expensive for 
large segment lists.
+    Tracing.ThreadAccountantOps.sampleAndCheckInterruption();

Review Comment:
   I understand that consolidating the sampling into a single location can 
improve readability, but in this case it would come at the cost of 
precision—because you’d only capture metrics once, after the entire operation 
completes. For example, we have several pruner and ideally need to record a 
sample after each one to maintain accuracy (and the same applies to planning).



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