From 902450fe828a697e8107fb8771a04e1907656afb Mon Sep 17 00:00:00 2001 From: bao liang <29528966+lenboo@users.noreply.github.com> Date: Tue, 19 Nov 2019 19:20:06 +0800 Subject: [PATCH] fix bug: remove 'between' in sql search. (#1293) * [maven-release-plugin] prepare release 1.2.1-release * [maven-release-plugin] prepare for next development iteration * update * [maven-release-plugin] prepare release 1.2.0-release * [maven-release-plugin] prepare for next development iteration * [maven-release-plugin] prepare release 1.2.1-release * [maven-release-plugin] prepare for next development iteration * revert * [maven-release-plugin] prepare release 1.2.0-release * [maven-release-plugin] prepare for next development iteration * add sql files for postgre/mysql * add sql files * fix bug: postgre cannot support between. * fix bug: remove 'between' in sql search. * add release note * add release note --- ReleaseNotes.md | 54 +++++++++++++++++++ .../dolphinscheduler/dao/ProcessDao.java | 8 +-- .../dao/mapper/ProcessInstanceMapper.java | 8 +-- .../dao/mapper/ProcessInstanceMapper.xml | 9 ++-- 4 files changed, 67 insertions(+), 12 deletions(-) create mode 100644 ReleaseNotes.md diff --git a/ReleaseNotes.md b/ReleaseNotes.md new file mode 100644 index 000000000..ad8999f85 --- /dev/null +++ b/ReleaseNotes.md @@ -0,0 +1,54 @@ +## 1.2.0 + +### New Feature +1. Support postgre sql +2. Change all Chinese names to English +3. Add flink and http task support +4. Cross project dependencies +5. Modify mybatis to mybatisplus, support multy databases. +6. Add export and import definition feaure +7. Github actions ci compile check +8. Add method and parameters comments +9. Add java doc for common module + + +### Enhancement +1. Add license and notice files +2. Move batchDelete Process Define/Instance Outside for transactional +3. Remove space before and after login user name +4. Dockerfile optimization +5. Change mysql-connector-java scope to test +6. Owners and administrators can delete schedule +7. DB page rename and background color modification  +8. Add postgre performance monitor +9. Resolve style conflict, recipient cannot tab and value verification +10. Checkbox change background color and env to Chinese +11. Change chinese sql to english +12. Change sqlSessionTemplate singleton and reformat code  +13. The value of loadaverage should be two decimal places +14. Delete alert group need delete the relation of user and alert group +15. Remove check resources when delete tenant +16. Check processInstance state before delete worker group  +17. Add check user and definitions function when delete tenant +18. Delete before check to avoid KeeperException$NoNodeException + +### Bug Fixes +1. Fix #1245, make scanCommand transactional +2. Fix ZKWorkerClient not close PathChildrenCache +3. Data type convert error ,email send error bug fix +4. Catch exception transaction method does not take effect to modify +5. Fix the spring transaction not worker bug +6. Task log print worker log bug fix +7. Fix api server debug mode bug +8. The task is abnormal and task is running bug fix +9. Fix bug: tasks queue length error +10. Fix unsuitable error message +11. Fix bug: phone can be empty +12. Fix email error password +13. Fix CheckUtils.checkUserParams method +14. The process cannot be terminated while tasks in the status submit success +15. Fix too many connection in upgrade or create  +16. Fix the bug when worker execute task using queue. and remove checking +17. Resole verify udf name error and delete udf error  +18. Fix bug: task cannot submit when recovery failover + diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/ProcessDao.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/ProcessDao.java index b19b55f31..b81b822cc 100644 --- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/ProcessDao.java +++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/ProcessDao.java @@ -1642,8 +1642,8 @@ public class ProcessDao { */ public ProcessInstance findLastSchedulerProcessInterval(int definitionId, DateInterval dateInterval) { return processInstanceMapper.queryLastSchedulerProcess(definitionId, - DateUtils.dateToString(dateInterval.getStartTime()), - DateUtils.dateToString(dateInterval.getEndTime())); + dateInterval.getStartTime(), + dateInterval.getEndTime()); } /** @@ -1666,8 +1666,8 @@ public class ProcessDao { */ public ProcessInstance findLastRunningProcess(int definitionId, DateInterval dateInterval) { return processInstanceMapper.queryLastRunningProcess(definitionId, - DateUtils.dateToString(dateInterval.getStartTime()), - DateUtils.dateToString(dateInterval.getEndTime()), + dateInterval.getStartTime(), + dateInterval.getEndTime(), stateArray); } diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapper.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapper.java index c063d718c..167928cb4 100644 --- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapper.java +++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapper.java @@ -152,8 +152,8 @@ public interface ProcessInstanceMapper extends BaseMapper { * @return process instance */ ProcessInstance queryLastSchedulerProcess(@Param("processDefinitionId") int definitionId, - @Param("startTime") String startTime, - @Param("endTime") String endTime); + @Param("startTime") Date startTime, + @Param("endTime") Date endTime); /** * query last running process instance @@ -164,8 +164,8 @@ public interface ProcessInstanceMapper extends BaseMapper { * @return process instance */ ProcessInstance queryLastRunningProcess(@Param("processDefinitionId") int definitionId, - @Param("startTime") String startTime, - @Param("endTime") String endTime, + @Param("startTime") Date startTime, + @Param("endTime") Date endTime, @Param("states") int[] stateArray); /** diff --git a/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapper.xml b/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapper.xml index 2e63867d3..d37ea9214 100644 --- a/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapper.xml +++ b/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapper.xml @@ -126,7 +126,7 @@ where 1 = 1 and t.is_sub_process = 0 - and t.start_time >= #{startTime} and t.start_time #{endTime} + and t.start_time = ]]> #{startTime} and t.start_time #{endTime} and p.id in @@ -147,7 +147,7 @@ from t_ds_process_instance where process_definition_id=#{processDefinitionId} - and schedule_time between #{startTime} and #{endTime} + and schedule_time = ]]> #{startTime} and schedule_time #{endTime} order by end_time desc limit 1 @@ -163,7 +163,8 @@ and process_definition_id=#{processDefinitionId} - and (schedule_time between #{startTime} and #{endTime} or start_time between #{startTime} and #{endTime}) + and (schedule_time = ]]> #{startTime} and schedule_time #{endTime} + or start_time = ]]> #{startTime} and start_time #{endTime}) order by start_time desc limit 1 @@ -173,7 +174,7 @@ where process_definition_id=#{processDefinitionId} and schedule_time is null - and start_time between #{startTime} and #{endTime} + and start_time = ]]> #{startTime} and start_time #{endTime} order by end_time desc limit 1 -- GitLab