dolphinscheduler icon indicating copy to clipboard operation
dolphinscheduler copied to clipboard

[Bug] [Master] resume failure processInstance state remain failure

Open KEN-LJQ opened this issue 3 years ago • 17 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

What happened

Workflow process instance resume from failure state, and all task run success actully, but task instance and process intance remain failure. And when you click resume again, all switch to success.

Checking task log, the task has submit and run success when resume.

Checking database table t_ds_task_instance. There two record, old one state is failure, and new one is success. Which make sense. 企业微信截图_20221224173844

Since task is success, why ds judge it faliure and show failure on ui. Digging the ui http query, we found that it query both two record and return it, because of the flag. 企业微信截图_20221224174251 企业微信截图_20221224174335 企业微信截图_20221224174406 企业微信截图_20221224174501

And I don't know what happen, thx for help.

What you expected to happen

both task instance and process instance should change to success

How to reproduce

  1. create a workflow with task which suppose to run fail, and configure retry 3 times
  2. run workflow. task instance state should be failure and waiting to retry, and process instance stay running
  3. click stop. task instance state should be failure and process instance state should be stoped
  4. modify task make it will run success
  5. click resume
  6. task has submit and run. but when it finish, both task and process instance state change to failure
  7. click resume again
  8. both task and process change to success

Anything else

we are on v2.0.7

Version

2.0.x

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

KEN-LJQ avatar Dec 24 '22 09:12 KEN-LJQ

Search before asking

  • [X] I had searched in the issues and found no similar issues.

What happened

Workflow process instance resume from failure state, and all task run success actully, but task instance and process intance remain failure. And when you click resume again, all switch to success.

Checking task log, the task has submit and run success when resume.

Checking database table t_ds_task_instance. There two record, old one state is failure, and new one is success. Which make sense. 企业微信截图_20221224173844

Since task is success, why ds judge it faliure and show failure on ui. Digging the ui http query, we found that it query both two record and return it, because of the flag. 企业微信截图_20221224174251 企业微信截图_20221224174335 企业微信截图_20221224174406 企业微信截图_20221224174501

And I don't know what happen, thx for help.

What you expected to happen

both task instance and process instance should change to success

How to reproduce

  1. create a workflow with task which suppose to run fail, and configure retry 3 times
  2. run workflow. task instance state should be failure and waiting to retry, and process instance stay running
  3. click stop. task instance state should be failure and process instance state should be stoped
  4. modify task make it will run success
  5. click resume
  6. task has submit and run. but when it finish, both task and process instance state change to failure
  7. click resume again
  8. both task and process change to success

Anything else

we are on v2.0.7

Version

2.0.x

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

github-actions[bot] avatar Dec 24 '22 09:12 github-actions[bot]

Thank you for your feedback, we have received your issue, Please wait patiently for a reply.

  • In order for us to understand your request as soon as possible, please provide detailed information、version or pictures.
  • If you haven't received a reply for a long time, you can join our slack and send your question to channel #troubleshooting

github-actions[bot] avatar Dec 24 '22 09:12 github-actions[bot]

kind of associate with this issue https://github.com/apache/dolphinscheduler/issues/10673

KEN-LJQ avatar Dec 24 '22 10:12 KEN-LJQ

Hi @KEN-LJQ , modify the task in step 4, the task version add 1, and then click resume, the running task is not initial task. I think task_instance has two record, old one state is failure, and new one is success, that is normal

brave-lee avatar Jan 17 '23 02:01 brave-lee

image

brave-lee avatar Jan 17 '23 02:01 brave-lee

Hi, @JinyLeeChina thanks for your replay. And yes, two record is right, but I has a question about is that normal this task and process judge as failure just because there's a failure record? But the truth is new one is success, should we judge this task as success?

KEN-LJQ avatar Jan 17 '23 02:01 KEN-LJQ

Hi @KEN-LJQ , In step 4 modify task make it will run success, did you update the definition of process instance 33? If not, then resume the process instance will result in the same failure.

SbloodyS avatar Jan 17 '23 03:01 SbloodyS

@SbloodyS , yes, I modify it

KEN-LJQ avatar Jan 17 '23 03:01 KEN-LJQ

I can not reproduce this issue according to your steps with shell task in the 2.0.5-release. Are there any important steps missing? @KEN-LJQ

SbloodyS avatar Jan 17 '23 03:01 SbloodyS

Hi @KEN-LJQ , I tested according to your steps, but the result of step 6 is different from yours. My result is task instance success and process instance fail, and task and process instance should be success

brave-lee avatar Jan 17 '23 03:01 brave-lee

@SbloodyS @JinyLeeChina let me test it according my step again, what is your version?

KEN-LJQ avatar Jan 17 '23 03:01 KEN-LJQ

I tested it use 2.0.7 and 2.0.8-prepare, I suggest you use the 2.0.8-prepare to test

brave-lee avatar Jan 17 '23 03:01 brave-lee

@JinyLeeChina I try with 2.0.8-prepare, still can reproduce, may be you missing config retry? 企业微信截图_20230117135952

KEN-LJQ avatar Jan 17 '23 06:01 KEN-LJQ

No, I config retry, however, it cannot reproduce the failure of process and task instances. The result is that the process instance fails and the task instance succeeds image image image

brave-lee avatar Jan 17 '23 12:01 brave-lee

Maybe I missing some steps, I will test it again later to figure out why. But as your results,process instance becomes failures suppose to be wrong result?

KEN-LJQ avatar Jan 17 '23 13:01 KEN-LJQ

Maybe I missing some steps, I will test it again later to figure out why. But as your results,process instance becomes failures suppose to be wrong result?

Yes, I will confirm why it happen

brave-lee avatar Jan 17 '23 14:01 brave-lee

Maybe I missing some steps, I will test it again later to figure out why. But as your results,process instance becomes failures suppose to be wrong result?

I submit a PR to fix it, @KEN-LJQ @SbloodyS please review

brave-lee avatar Jan 18 '23 09:01 brave-lee