FrankChen021 commented on code in PR #20293:
URL: https://github.com/apache/druid/pull/20293#discussion_r4024176613


##########
multi-stage-query/src/main/java/org/apache/druid/msq/exec/ControllerHolder.java:
##########
@@ -169,7 +181,15 @@ public ListenableFuture<?> runAsync(
       Thread.currentThread().setName(makeThreadName());
 
       try {
-        final CaptureReportQueryListener reportListener = new 
CaptureReportQueryListener(listener);
+        final CaptureReportQueryListener reportListener = new 
CaptureReportQueryListener(listener)
+        {
+          @Override
+          public void onQueryComplete(final MSQTaskReportPayload report)
+          {
+            finalReport = TaskReport.buildTaskReports(new 
MSQTaskReport(controller.queryId(), report));

Review Comment:
   Thanks, understood that returning the final report from `/liveReports` would 
be acceptable. I kept `liveReports()` and `finalReport()` separate in this PR 
so the live-snapshot API and the final-only publication signal remain explicit, 
and so this concurrency fix does not also change the endpoint contract. The 
duplicate `CaptureReportQueryListener` capture has still been removed; the 
final report is retained only by `ControllerImpl`.



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