You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/11/29 16:07:55 UTC

[GitHub] [dolphinscheduler] ruanwenjun commented on issue #13045: [Improvement][Master] add max submit times of workflow

ruanwenjun commented on issue #13045:
URL: https://github.com/apache/dolphinscheduler/issues/13045#issuecomment-1330884530

   > 1. add `workflow.submit.max.times=10 ` in common.properties
   > * 2. add parameter ` private AtomicInteger maxSubmitTimes;` in class of WorkflowEvent
   You don't need to use `AtomicInteger`, the event will not be consumed concurrently.
   
   > * 3. when workflowSubmitStatue is fail after submit workflow, decrement ` maxSubmitTimes`
   > * 4. 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.
   
   > * 5. get ` WorkflowExecuteRunnable` from `processInstanceExecCacheManager ` by  ` processInstanceId`
   > * 6. add a special `stateEvent `, add update the method of `handleEvents` that get the special`stateEvent` will throw a Exception
   > * 7. when WorkflowExecuteRunnable is fail will call the method ` onFailure` that notify to parentProcessInstance
   
   


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org