[Bug][dolphinscheduler-server] the different scheduled time of the daily scheduling instance and supplemented intance
In configuration instructions here:https://dolphinscheduler.apache.org/zh-cn/docs/latest/user_doc/system-manual.html 8.1 System parameters ${system.biz.date} The day before the scheduled time of the daily scheduling instance, the format is yyyyMMdd, when the data is supplemented, the date is +1
Steps to reproduce the behavior, for example: I have two workflows ODS_01 and DWD_01,Dwd_01 depends on ODS_01. Today, ODS_01 was executed through the daily scheduling instance (scheduleTime is 2021-08-12 03:00:00), but DWD_01 was not executed. I started DWD_01 through the data complement task, and the scheduleTime is 2021-08-11 03:00:00. Because their dates were inconsistent, DWD_01 could not find the successful ODS_01 instance when checking whether the pre-dependent was completed, because it use the scheduleTime is 2021-08-11 03:00:00 to found ODS_01 rather than 2021-08-12 03:00:00. So it's been impossible to execute.
Any reply would be appreciated.
Hi:
- 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 subscribe to the developer's email,Mail subscription steps reference https://dolphinscheduler.apache.org/zh-cn/community/development/subscribe.html ,Then write the issue URL in the email content and send question to [email protected].
BTW, above question belong to version of latest, and then I saw this line in the code ShellTask.java (L174):
if (CommandType.COMPLEMENT_DATA.getCode() == taskExecutionContext.getCmdTypeIfComplement()) { date = DateUtils. Add (taskExecutionContext getScheduleTime (), DAY_OF_MONTH, 1); }
I don't know why add 1 day fro COMPLEMENT_DATA type, i think this will make some questions. for example https://github.com/apache/dolphinscheduler/issues/5639 https://github.com/apache/dolphinscheduler/issues/5140
anyone can explain it, thanks. if remove below code, what's wrong with the supplement data logic? org.apache.dolphinscheduler.server.worker.task.shell.ShellTask.java
if (CommandType.COMPLEMENT_DATA.getCode() == taskExecutionContext.getCmdTypeIfComplement()) { date = DateUtils. Add (taskExecutionContext getScheduleTime (), DAY_OF_MONTH, 1); }
Can anyone answer this question pls, is my question not well described?
The day before the scheduled time of the daily scheduling instance, the format is yyyyMMdd, when the data is supplemented, the date is +1.
Date scheduleTime = DateUtils.stringToDate("2019-12-20 00:00:00");
System.out.println(BusinessTimeUtils.getBusinessTime(CommandType.START_CURRENT_TASK_PROCESS,scheduleTime));
System.out.println(BusinessTimeUtils.getBusinessTime(CommandType.COMPLEMENT_DATA,scheduleTime));
same scheduleTime but got paramter time is different
I run complement data task, the schedule time is 2021-10-19 09:00:00 the global paramter is start_time : $[yyyy-MM-dd\ HH:mm:ss-1/24] end_time : $[yyyy-MM-dd\ HH:mm:ss]
but the task got start_time : 2021-10-20 08:00:00 and end_time : 2021-10-20 09:00:00
i think start_time should be 2021-10-19 08:00:00 and end_time : 2021-10-19 09:00:00
@CalvinKirs
The day before the scheduled time of the daily scheduling instance, the format is yyyyMMdd, when the data is supplemented, the date is +1.
cc @choucmei
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.
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.