Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improvement][Master] add max submit times of workflow #13045

Closed
3 tasks done
fuchanghai opened this issue Nov 29, 2022 · 8 comments · Fixed by #13051
Closed
3 tasks done

[Improvement][Master] add max submit times of workflow #13045

fuchanghai opened this issue Nov 29, 2022 · 8 comments · Fixed by #13051
Labels
backend improvement make more easy to user or prompt friendly Stale

Comments

@fuchanghai
Copy link
Member

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

when submit workflow failure , will resubmit workflow . if have not maximum number of submissions,will cause print a lot log which takes up a lot of resources

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@fuchanghai fuchanghai added improvement make more easy to user or prompt friendly Waiting for reply Waiting for reply labels Nov 29, 2022
@github-actions
Copy link

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

@fuchanghai
Copy link
Member Author

fuchanghai commented Nov 29, 2022

    1. add workflow.submit.max.times=10 in common.properties
    1. add parameter private AtomicInteger maxSubmitTimes; in class of WorkflowEvent
    1. when workflowSubmitStatue is fail after submit workflow, decrement maxSubmitTimes
    1. when maxSubmitTimes equal 0 change processInstance's status to fail and update to DB
    1. get WorkflowExecuteRunnable from processInstanceExecCacheManager by processInstanceId
    1. add a special stateEvent , add update the method of handleEvents that get the specialstateEvent will throw a Exception
    1. when WorkflowExecuteRunnable is fail will call the method onFailure that notify to parentProcessInstance

@fuchanghai
Copy link
Member Author

fuchanghai commented Nov 29, 2022

@ruanwenjun
Copy link
Member

ruanwenjun commented Nov 29, 2022

    1. add workflow.submit.max.times=10 in common.properties
    1. add parameter private AtomicInteger maxSubmitTimes; in class of WorkflowEvent

You don't need to use AtomicInteger, the event will not be consumed concurrently.

    1. when workflowSubmitStatue is fail after submit workflow, decrement maxSubmitTimes
    1. when maxSubmitTimes equal 0 change processInstance's status to fail and update to DB

You need to know when this event consume failed always due to the db crash, so it will throw exception when you update status.

    1. get WorkflowExecuteRunnable from processInstanceExecCacheManager by processInstanceId
    1. add a special stateEvent , add update the method of handleEvents that get the specialstateEvent will throw a Exception
    1. when WorkflowExecuteRunnable is fail will call the method onFailure that notify to parentProcessInstance

@SbloodyS SbloodyS added backend and removed Waiting for reply Waiting for reply labels Nov 30, 2022
fuchanghai pushed a commit to fuchanghai/dolphinscheduler that referenced this issue Nov 30, 2022
fuchanghai pushed a commit to fuchanghai/dolphinscheduler that referenced this issue Nov 30, 2022
@fuchanghai
Copy link
Member Author

    1. add workflow.submit.max.times=10 in application.yml
    1. add parameter private int maxSubmitTimes; in class of WorkflowEvent
    1. when workflowSubmitStatue is fail after submit workflow, decrement maxSubmitTimes
    1. when maxSubmitTimes equal 0 get WorkflowExecuteRunnable sumbit a special stateEvent
    1. update the method of handleEvents that get the specialstateEvent will update processInstance by id and run the method of endProcess

fuchanghai pushed a commit to fuchanghai/dolphinscheduler that referenced this issue Dec 15, 2022
fuchanghai pushed a commit to fuchanghai/dolphinscheduler that referenced this issue Dec 15, 2022
fuchanghai added a commit to fuchanghai/dolphinscheduler that referenced this issue Dec 26, 2022
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Dec 31, 2022
@github-actions
Copy link

github-actions bot commented Jan 7, 2023

This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.

@github-actions github-actions bot closed this as completed Jan 7, 2023
@davidzollo davidzollo reopened this Jan 7, 2023
@github-actions
Copy link

This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.

fuchanghai added a commit to fuchanghai/dolphinscheduler that referenced this issue Feb 9, 2023
fuchanghai pushed a commit to fuchanghai/dolphinscheduler that referenced this issue Feb 15, 2023
caishunfeng pushed a commit that referenced this issue Feb 20, 2023
…avoid an endless loop (#13051)

* [improve-#13045] add max submit number of workflow

* [fix-13405] remove max times

* Update dolphinscheduler-master/src/main/resources/application.yaml

Co-authored-by: Wenjun Ruan <wenjun@apache.org>

---------

Co-authored-by: fuchanghai <‘2875334588@qq.com’>
Co-authored-by: Wenjun Ruan <wenjun@apache.org>
fuchanghai added a commit to fuchanghai/dolphinscheduler that referenced this issue Feb 22, 2023
fuchanghai pushed a commit to fuchanghai/dolphinscheduler that referenced this issue Oct 28, 2023
fuchanghai pushed a commit to fuchanghai/dolphinscheduler that referenced this issue Oct 31, 2023
EricGao888 added a commit to fuchanghai/dolphinscheduler that referenced this issue Oct 31, 2023
EricGao888 added a commit to fuchanghai/dolphinscheduler that referenced this issue Nov 6, 2023
fuchanghai pushed a commit to fuchanghai/dolphinscheduler that referenced this issue Nov 6, 2023
fuchanghai pushed a commit to fuchanghai/dolphinscheduler that referenced this issue Nov 6, 2023
fuchanghai pushed a commit to fuchanghai/dolphinscheduler that referenced this issue Nov 8, 2023
fuchanghai pushed a commit to fuchanghai/dolphinscheduler that referenced this issue Nov 8, 2023
fuchanghai pushed a commit to fuchanghai/dolphinscheduler that referenced this issue Nov 8, 2023
fuchanghai pushed a commit to fuchanghai/dolphinscheduler that referenced this issue Nov 8, 2023
fuchanghai pushed a commit to fuchanghai/dolphinscheduler that referenced this issue Nov 8, 2023
EricGao888 pushed a commit that referenced this issue Nov 8, 2023
* [fix-#13045] fix endless loop

---------

Co-authored-by: fuchanghai <‘2875334588@qq.com’>
zhuangchong pushed a commit that referenced this issue Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend improvement make more easy to user or prompt friendly Stale
Projects
None yet
4 participants