raghavyadav01 commented on code in PR #20039:
URL: https://github.com/apache/pinot/pull/20039#discussion_r4463467211


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotHelixTaskResourceManager.java:
##########
@@ -562,6 +566,16 @@ public synchronized Map<String, TaskStatusSummary> 
getTableTaskStatusSummary(Str
         taskStatusSummary.getSubtaskRunningTimes().put(taskId, 
runningTimeMillis);
       }
     }
+    // A job whose subtasks keep starting or finishing is draining, however 
old it is: only the time since the last
+    // such progress tells a stuck queue apart from a long one
+    if (jobStartTime > 0) {
+      long queueStallTimeMillis = currentTime - lastProgressTime;
+      for (TaskStatusSummary taskStatusSummary : 
taskStatusSummaryMap.values()) {
+        if (!taskStatusSummary.getSubtaskWaitingTimes().isEmpty()) {
+          taskStatusSummary.setQueueStallTimeMs(queueStallTimeMillis);

Review Comment:
   Same reasoning as the thread above: the gauge tracks the job's shared queue, 
so a table waiting its turn in a draining queue shouldn't alert.



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