jasperjiaguo commented on code in PR #13598:
URL: https://github.com/apache/pinot/pull/13598#discussion_r1698049547


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/HashJoinOperator.java:
##########
@@ -260,6 +260,7 @@ private void buildBroadcastHashTable()
         hashCollection.add(row);

Review Comment:
   Have we considered the option to do  sampleAndCheckInterruption every X rows 
in this loop? Similar for some other operators. If the rightBlock size itself 
is large and the operation itself is mem-heavy (e.g. heap, hashmap add) the OOM 
may happen within a block if we do not sample at a finer granularity.



##########
pinot-core/src/main/java/org/apache/pinot/core/accounting/PerQueryCPUMemAccountantFactory.java:
##########
@@ -286,17 +286,18 @@ public void 
setThreadResourceUsageProvider(ThreadResourceUsageProvider threadRes
     }
 
     @Override
-    public void createExecutionContextInner(@Nullable String queryId, int 
taskId, @Nullable
+    public void createExecutionContextInner(@Nullable String queryId, int 
taskId,
+        ThreadExecutionContext.TaskType taskType, @Nullable
         ThreadExecutionContext parentContext) {
       _threadLocalEntry.get()._errorStatus.set(null);
       if (parentContext == null) {
         // is anchor thread
         assert queryId != null;
-        _threadLocalEntry.get().setThreadTaskStatus(queryId, 
CommonConstants.Accounting.ANCHOR_TASK_ID,
+        _threadLocalEntry.get().setThreadTaskStatus(queryId, 
CommonConstants.Accounting.ANCHOR_TASK_ID, taskType,
             Thread.currentThread());
       } else {
         // not anchor thread
-        
_threadLocalEntry.get().setThreadTaskStatus(parentContext.getQueryId(), taskId,
+        
_threadLocalEntry.get().setThreadTaskStatus(parentContext.getQueryId(), taskId, 
taskType,

Review Comment:
   Should we set this from the anchor thread via `parentContext.getTaskType()`?



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

Reply via email to