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/09/30 02:19:26 UTC

[GitHub] [dolphinscheduler] ruanwenjun commented on issue #11669: [Bug] [WorkflowInstance] the value of duration in Workflow Instance table is wrong

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

   > > Hi @caishunfeng thank u for ur reply, I'm also talking about the original record on workflow instance page. I agree with your design, but it's not actually implemented that way. There are two problems that are completely different from this design. Please check the following screenshot: _org.apache.dolphinscheduler.service.process.ProcessServiceImpl.constructProcessInstance_ ![image](https://user-images.githubusercontent.com/20518339/187028602-16ac5a89-f65e-42ee-80ee-d878571edfee.png) When the _**MasterSchedulerBootstrap**_ thread gets the command from the db and converts it to the process instance, it will update the process instance to db, including the startTime and endTime fields. So there are two issues. **Issue 1: The start time of this workflow record will be refreshed every time it is re-run.** It cannot keep the first time as startTime. **Issue 2: update endTime to null cannot take affect.** because Mybatis plus updateById will skip the null params (FieldStrategy.NOT_
 NULL is default update strategy). We should set the FieldStrategy to IGNORED for the ProcessInstance.endTime, please review the following change: `@TableField(updateStrategy = FieldStrategy.IGNORED) private Date endTime;`
   > 
   > @DarkAssassinator Thanks for your reply. I think `re-run` is different from `recovery failure` or `recovery pause`, it's better to create a new workflow instance with the name such as `workflowName-2`, and then it can keep the old one. What do you think? cc @lenboo @ruanwenjun
   
   +1.


-- 
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