adarshsanjeev commented on code in PR #13205:
URL: https://github.com/apache/druid/pull/13205#discussion_r1025361291


##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/WorkerSketchFetcher.java:
##########
@@ -122,22 +128,31 @@ private CompletableFuture<Either<Long, 
ClusterByPartitions>> inMemoryFullSketchM
                 stageDefinition.getId().getQueryId(),
                 stageDefinition.getStageNumber()
             );
-        partitionFuture.whenComplete((result, exception) -> 
snapshotFuture.cancel(true));
+        partitionFuture.whenComplete((result, exception) -> {
+          if (exception != null || (result != null && result.isError())) {
+            snapshotFuture.cancel(true);
+          }

Review Comment:
   Wouldn't this also be called with non null result if the future successfully 
returns later, which shouldn't be an ISE?



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