loquisgon commented on a change in pull request #11486:
URL: https://github.com/apache/druid/pull/11486#discussion_r680111320



##########
File path: 
indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTask.java
##########
@@ -555,14 +559,23 @@ private TaskStatus runSinglePhaseParallel(TaskToolbox 
toolbox) throws Exception
     );
 
     final TaskState state = runNextPhase(runner);
+    TaskStatus taskStatus;
     if (state.isSuccess()) {
       //noinspection ConstantConditions
       publishSegments(toolbox, runner.getReports());
       if (awaitSegmentAvailabilityTimeoutMillis > 0) {
         waitForSegmentAvailability(runner.getReports());
       }
+      taskStatus = TaskStatus.success(getId());
+    } else {
+      // there is only success or failure after running....
+      Preconditions.checkState(state.isFailure());

Review comment:
       Today there is no state other than failure after a task ran and was not 
successful. I added a message  to the exception for the case when that state is 
added so we know that there is some code that needs to be changed as well as 
throwing an exception to let the person change the code in an appropriate 
manner for the new state.




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