You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/10/27 05:31:00 UTC

[GitHub] [druid] LakshSingla commented on a diff in pull request #13263: Add task start status to worker report

LakshSingla commented on code in PR #13263:
URL: https://github.com/apache/druid/pull/13263#discussion_r1006416869


##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/indexing/MSQWorkerTaskLauncher.java:
##########
@@ -345,6 +345,26 @@ private void runNewTasks()
     }
   }
 
+  /**
+   * Returns the number of worker tasks that are not yet fully started.
+   */
+  public int getPendingWorkerTasks()

Review Comment:
   A small question regarding synchronization, does having separate calls for pending worker tasks and running worker tasks can give the wrong results? (i.e. `fullyStarteedTasks() + pendingWorkerTasks() != desiredTaskCount).
   If so, then I wonder if it would be appropriate to have a single call in the ControllerImpl to get the pending (or running tasks) and calculate the counterpart by subtracting it from the desiredTaskCount.



##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/ControllerImpl.java:
##########
@@ -1807,10 +1809,26 @@ private static MSQStatusReport makeStatusReport(
       @Nullable final MSQErrorReport errorReport,
       final Queue<MSQErrorReport> errorReports,
       @Nullable final DateTime queryStartTime,
-      final long queryDuration
+      final long queryDuration,
+      MSQWorkerTaskLauncher taskLauncher
   )
   {
-    return new MSQStatusReport(taskState, errorReport, errorReports, queryStartTime, queryDuration);
+    int pendingTasks = 0;

Review Comment:
   Should pending tasks be 0 here or should it be the total number of tasks that the user has launched the query with? In case that is not known at this point here, we should probably change it to something like -1 to denote unknown. 



-- 
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-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org