Sky-Gu opened a new issue, #13073:
URL: https://github.com/apache/dolphinscheduler/issues/13073

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   SubTaskProcessor.updateTaskState() uses TaskExecutionStatus.of("5"),  but 
TaskExecutionStatus doesn't have a corresponding enumerated type.
   
   This will cause the subtask workflow to not be updated properly.
   
   ### What you expected to happen
   
   The subtask workflow status is updated normally.
   
   ### How to reproduce
   
   1. Use the sub_process task node
   2. Click Stop in the main scheduling work
   3. Update the master scheduling status to STOP (code:5)
   4. The task instance status corresponding to sub_process cannot be updated
   
   ### Anything else
   
   log
   
   
   [INFO] 2022-12-02 09:57:08.579 +0800 
org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[97] 
- [WorkflowInstance-0][TaskInstance-67] - Submit state event success, 
stateEvent: TaskStateEvent(processInstanceId=67, taskInstanceId=1167, 
taskCode=7726737557952, status=TaskExecutionStatus{code=1, desc='running'}, 
type=TASK_STATE_CHANGE, key=null, channel=null, context=null)
   [INFO] 2022-12-02 09:57:08.594 +0800 
org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable:[242] 
- [WorkflowInstance-67][TaskInstance-1167] - Begin to handle state event, 
TaskStateEvent(processInstanceId=67, taskInstanceId=1167, 
taskCode=7726737557952, status=TaskExecutionStatus{code=1, desc='running'}, 
type=TASK_STATE_CHANGE, key=null, channel=null, context=null)
   [INFO] 2022-12-02 09:57:08.594 +0800 
org.apache.dolphinscheduler.server.master.event.TaskStateEventHandler:[57] - 
[WorkflowInstance-67][TaskInstance-1167] - Handle task instance state event, 
the current task instance state TaskExecutionStatus{code=1, desc='running'} 
will be changed to TaskExecutionStatus{code=1, desc='running'}
   [INFO] 2022-12-02 09:57:08.594 +0800 TaskLogLogger-class 
org.apache.dolphinscheduler.server.master.runner.task.SubTaskProcessor:[191] - 
[WorkflowInstance-67][TaskInstance-1167] - set work flow 67 task 1167 running
   [INFO] 2022-12-02 09:57:08.599 +0800 TaskLogLogger-class 
org.apache.dolphinscheduler.server.master.runner.task.SubTaskProcessor:[126] - 
[WorkflowInstance-67][TaskInstance-1167] - work flow 67 task 1167, sub work 
flow: 68 state: WorkflowExecutionStatus{code=5, desc='stop'}
   [ERROR] 2022-12-02 09:57:08.599 +0800 TaskLogLogger-class 
org.apache.dolphinscheduler.server.master.runner.task.SubTaskProcessor:[91] - 
[WorkflowInstance-67][TaskInstance-1167] - work flow 67 sub task 1167 exceptions
   java.lang.IllegalArgumentException: The task execution status code: 5 is 
invalidated
        at 
org.apache.dolphinscheduler.plugin.task.api.enums.TaskExecutionStatus.of(TaskExecutionStatus.java:60)
        at 
org.apache.dolphinscheduler.server.master.runner.task.SubTaskProcessor.updateTaskState(SubTaskProcessor.java:133)
        at 
org.apache.dolphinscheduler.server.master.runner.task.SubTaskProcessor.runTask(SubTaskProcessor.java:88)
        at 
org.apache.dolphinscheduler.server.master.runner.task.BaseTaskProcessor.run(BaseTaskProcessor.java:237)
        at 
org.apache.dolphinscheduler.server.master.runner.task.BaseTaskProcessor.action(BaseTaskProcessor.java:209)
        at 
org.apache.dolphinscheduler.server.master.event.TaskStateEventHandler.handleStateEvent(TaskStateEventHandler.java:79)
        at 
org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable.handleEvents(WorkflowExecuteRunnable.java:243)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
   
   ### Version
   
   3.1.x
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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

Reply via email to