gianm commented on code in PR #20825:
URL: https://github.com/apache/druid/pull/20825#discussion_r4459209841


##########
multi-stage-query/src/main/java/org/apache/druid/msq/dart/controller/DartControllerRegistry.java:
##########
@@ -123,6 +132,18 @@ public void stop()
     if (cleanupExec != null) {
       cleanupExec.shutdown();
     }
+
+    final List<ControllerHolder> holders = new 
ArrayList<>(controllerMap.values());
+    if (!holders.isEmpty()) {
+      log.info("Canceling [%d] queries that are still running.", 
holders.size());
+
+      for (final ControllerHolder holder : holders) {
+        holder.cancel(CancellationReason.TASK_SHUTDOWN, null);

Review Comment:
   I added some comments here about what's going on, but I refrained from 
actually canceling in a nonblocking or parallel way. It would add complexity to 
the code and I'm not sure it's worth it. If experience shows it's worth it, we 
can make a change.



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