anuragrai16 commented on code in PR #18475:
URL: https://github.com/apache/pinot/pull/18475#discussion_r3414903832


##########
pinot-core/src/main/java/org/apache/pinot/core/operator/BaseOperator.java:
##########
@@ -55,10 +59,36 @@ public ExplainInfo getExplainInfo() {
 
   protected void checkTermination() {
     QueryThreadContext.checkTermination(this::getExplainName);
+    checkScanBasedKilling();
   }
 
   protected void checkTerminationAndSampleUsage() {
     QueryThreadContext.checkTerminationAndSampleUsage(this::getExplainName);
+    checkScanBasedKilling();

Review Comment:
   We are not "registering" the scan cost in each operator, just getting the 
scan cost and pushing the individual cost metrics from each operator (Note that 
each operator may push a subset of the cost context metrics based on what it 
does). 
   And moving `checkScanBasedKilling` in 
`QueryThreadContext.checkTerminationAndSampleUsage` would also introduce 
dependency on adding `QueryKillingManager` integration in thread context which 
doesn't seem logical. The better long-term follow up is to actually implement 
the `QueryThreadContext.checkTerminationAndSampleUsage` as a specialized 
`QueryKillingStrategy` since OOM query termination is just another Query 
killing strategy that takes JVM resources into account.



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