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

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


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to