dolphinscheduler icon indicating copy to clipboard operation
dolphinscheduler copied to clipboard

Tasks that should have been retried directly fail to finish

Open zhanghuidouble opened this issue 7 years ago • 9 comments

*For better global communication, please give priority to using English description, thx! *

Describe the bug

MasterExecThread.runProcess will updateProcessInstanceState after run task , the method of getProcessInstanceState will check if processFailed ,the code is

image

but One case is that readyToSubmitTaskList.size !=0 but activeTaskNode.size = 0

the case like this:

  1. create a DAG like this

[{"connects":[],"createTime":1569291957000,"desc":"超时失败告警重试","flag":"YES","id":21,"locations":{"tasks-77628":{"targetarr":"","x":195,"name":"失败重试2次","y":431},"tasks-37810":{"targetarr":"","x":250,"name":"超时失败","y":133},"tasks-54599":{"targetarr":"","x":181,"name":"超时告警","y":289}},"name":"超时失败告警重试","processData":{"globalParams":[],"tasks":[{"depList":[],"dependence":"{}","desc":"","forbidden":false,"id":"tasks-37810","maxRetryTimes":0,"name":"超时失败","params":"{"resourceList":[],"localParams":[],"rawScript":"sleep 70"}","preTasks":"[]","retryInterval":1,"runFlag":"NORMAL","taskInstancePriority":"MEDIUM","taskTimeoutParameter":{"enable":true,"interval":1,"strategy":"FAILED"},"timeout":"{"strategy":"FAILED","interval":1,"enable":true}","type":"SHELL","workerGroupId":"-1"},{"depList":[],"dependence":"{}","desc":"","forbidden":false,"id":"tasks-54599","maxRetryTimes":0,"name":"超时告警","params":"{"resourceList":[],"localParams":[],"rawScript":"sleep 70"}","preTasks":"[]","retryInterval":1,"runFlag":"NORMAL","taskInstancePriority":"MEDIUM","taskTimeoutParameter":{"enable":true,"interval":1,"strategy":"WARN"},"timeout":"{"strategy":"WARN","interval":1,"enable":true}","type":"SHELL","workerGroupId":"-1"},{"depList":[],"dependence":"{}","desc":"","forbidden":false,"id":"tasks-77628","maxRetryTimes":2,"name":"失败重试2次","params":"{"resourceList":[],"localParams":[],"rawScript":"风风光光哼哼唧唧黑胡椒"}","preTasks":"[]","retryInterval":1,"runFlag":"NORMAL","taskInstancePriority":"MEDIUM","taskTimeoutParameter":{"enable":false,"interval":0},"timeout":"{"strategy":"","interval":null,"enable":false}","type":"SHELL","workerGroupId":"-1"}],"timeout":0},"projectId":12,"projectName":"中文qwe123_","receivers":"","receiversCc":"","releaseState":"ONLINE","timeout":0,"updateTime":1569291957000,"userId":"","version":0}]

  1. start

  2. the task "失败重试2次" Expect to retry 2 but only 1

Which version of Easy Scheduler: -[1.1.0-preview]

Additional context Add any other context about the problem here.

**Requirement or improvement

  • Please describe about your requirements or improvement suggestions.

zhanghuidouble avatar Sep 24 '19 06:09 zhanghuidouble

please update/add title use English for better global communication!

davidzollo avatar Sep 24 '19 11:09 davidzollo

please test under dev1.1.0 3

qiaozhanwei avatar Sep 26 '19 10:09 qiaozhanwei

I tried with the OnLineDemo ,it is still not wright. if just tried the simple task node retry it is ok,please try the DAG I put .

image

image

image

image

zhanghuidouble avatar Sep 29 '19 08:09 zhanghuidouble

@zhanghuidouble this question is already resolved on new version 1.2.0, the online demo also has also been updated synchronously, please check it, and close this issue if it's ok. In addition, please update the issue title to english. thank you very much for your contribution!

lenboo avatar Dec 04 '19 04:12 lenboo

Now there is still a problem with the online demo

image

zhanghuidouble avatar Dec 04 '19 04:12 zhanghuidouble

yes, the retry times would be 1 when you set the max retry to 2. because retry times contains the first running .

lenboo avatar Dec 04 '19 05:12 lenboo

No, the number of retries should be 2

image

zhanghuidouble avatar Dec 05 '19 07:12 zhanghuidouble

@zhanghuidouble this question is already resolved on new version 1.2.0, the online demo also has also been updated synchronously, please check it, and close this issue if it's ok. In addition, please update the issue title to english. thank you very much for your contribution!

@zhanghuidouble you can try a newer version, or fix it by yourself referring to the 1.2.0

gabry-lab avatar Jul 14 '20 09:07 gabry-lab