ruanwenjun commented on code in PR #18351:
URL:
https://github.com/apache/dolphinscheduler/pull/18351#discussion_r3432493355
##########
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java:
##########
@@ -760,15 +764,16 @@ public void
forceWorkflowInstanceSuccessByTaskInstanceId(TaskInstance task) {
List<Long> definiteTaskCodeList =
taskDefinitionLogs.stream().filter(definitionLog ->
definitionLog.getFlag() == Flag.YES)
.map(TaskDefinitionLog::getCode).collect(Collectors.toList());
- // only all tasks have instances
if (CollectionUtils.isEqualCollection(instanceTaskCodeList,
definiteTaskCodeList)) {
List<Integer> failTaskList = validTaskList.stream()
- .filter(instance -> instance.getState().isFailure() ||
instance.getState().isKill())
+ .filter(instance ->
instance.getState().isForceSuccess() || instance.getState().isFailure())
Review Comment:
If there exists task which status is killed or paused, then we still cannot
set the workflow instance to success.
A simple logic here might be to check whether all instances have succeeded.
--
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]