dufeng1010 opened a new issue, #15055:
URL: https://github.com/apache/dolphinscheduler/issues/15055

   ### 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
   
   when i execute a workflow, i find a task to need failover loop. not success.
   i can view a log, below error info:
   ```
   [ERROR] 2023-10-20 10:11:27.735 +0800 
org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable:[317] 
- [WorkflowInstance-3][TaskInstance-0] - State event handle error, get a 
unknown exception, will retry this event: TaskStateEvent(processInstanceId=3, 
taskInstanceId=132, taskCode=0, status=TaskExecutionStatus{code=7, 
desc='success'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null)
   java.lang.NullPointerException: null
           at 
org.apache.dolphinscheduler.server.master.utils.WorkflowInstanceUtils.logTaskInstanceInDetail(WorkflowInstanceUtils.java:74)
           at 
org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable.taskFinished(WorkflowExecuteRunnable.java:440)
           at 
org.apache.dolphinscheduler.server.master.event.TaskStateEventHandler.handleStateEvent(TaskStateEventHandler.java:74)
           at 
org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable.handleEvents(WorkflowExecuteRunnable.java:293)
           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)
   ```
   
   i view table data in ds, task_execute_type column is null, cause to loop 
execute task.
   
   
   
   当我在执行一个工作流时,发现工作流中的某个任务一直循环执行,该任务的所有历史实例都是需要容错。查看日志,发现如下错误:
   ```
   [ERROR] 2023-10-20 10:11:27.735 +0800 
org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable:[317] 
- [WorkflowInstance-3][TaskInstance-0] - State event handle error, get a 
unknown exception, will retry this event: TaskStateEvent(processInstanceId=3, 
taskInstanceId=132, taskCode=0, status=TaskExecutionStatus{code=7, 
desc='success'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null)
   java.lang.NullPointerException: null
           at 
org.apache.dolphinscheduler.server.master.utils.WorkflowInstanceUtils.logTaskInstanceInDetail(WorkflowInstanceUtils.java:74)
           at 
org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable.taskFinished(WorkflowExecuteRunnable.java:440)
           at 
org.apache.dolphinscheduler.server.master.event.TaskStateEventHandler.handleStateEvent(TaskStateEventHandler.java:74)
           at 
org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable.handleEvents(WorkflowExecuteRunnable.java:293)
           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)
   ```
   发现是因为task_execute_type字段的值为空导致的。我将task_execute_type的值设置为0,工作流中的所有任务就成功了。
   
   ### What you expected to happen
   
   if task_execute_type column should not be nullable, it be changed to not 
null column in ds database
   
   
   如果task_execute_type列的值不能为空,那么最好将该字段设置为非NULL列。
   
   ### How to reproduce
   
   i dont' know how and why to generated task_execute_type column's value is 
null, but it can exists.
   
   我忘记操作什么导致task_execute_type的值为null了。但是ds界面的确存在导致task_execute_type的值为NULL的操作。
   
   
   ### Anything else
   
   [ERROR] 2023-10-20 10:11:27.735 +0800 
org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable:[317] 
- [WorkflowInstance-3][TaskInstance-0] - State event handle error, get a 
unknown exception, will retry this event: TaskStateEvent(processInstanceId=3, 
taskInstanceId=132, taskCode=0, status=TaskExecutionStatus{code=7, 
desc='success'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null)
   java.lang.NullPointerException: null
           at 
org.apache.dolphinscheduler.server.master.utils.WorkflowInstanceUtils.logTaskInstanceInDetail(WorkflowInstanceUtils.java:74)
           at 
org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable.taskFinished(WorkflowExecuteRunnable.java:440)
           at 
org.apache.dolphinscheduler.server.master.event.TaskStateEventHandler.handleStateEvent(TaskStateEventHandler.java:74)
           at 
org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable.handleEvents(WorkflowExecuteRunnable.java:293)
           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
   
   dev
   
   ### 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