Jackie-Jiang commented on code in PR #16491:
URL: https://github.com/apache/pinot/pull/16491#discussion_r2274531991


##########
pinot-spi/src/main/java/org/apache/pinot/spi/trace/Tracing.java:
##########
@@ -332,17 +333,27 @@ public static boolean isInterrupted() {
           || Tracing.getThreadAccountant().isQueryTerminated();
     }
 
-    public static void sampleAndCheckInterruption() {
-      if (isInterrupted()) {
+    public static void checkInterruptionAndThrow(ThreadResourceUsageAccountant 
accountant) {
+      if (Thread.interrupted()) {
         throw new EarlyTerminationException("Interrupted while merging 
records");
       }
+
+      if (accountant.isAnchorThreadInterrupted() || 
accountant.isQueryTerminated()) {

Review Comment:
   Is this guaranteed to be OOM protection? Is regular query cancellation also 
hitting this condition?



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