diff --git a/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/TaskGroupQueueMapper.xml b/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/TaskGroupQueueMapper.xml index d2c43f18a7..a5bd80fbad 100644 --- a/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/TaskGroupQueueMapper.xml +++ b/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/TaskGroupQueueMapper.xml @@ -112,9 +112,9 @@ select from t_ds_task_group_queue - where priority = (select max(priority) from t_ds_task_group_queue where group_id = #{groupId} - and status = #{status} and in_queue = #{inQueue} and force_start = #{forceStart} ) and group_id = #{groupId} - and status = #{status} and in_queue = #{inQueue} and force_start = #{forceStart} limit 1 + where group_id = #{groupId} and status = #{status} and in_queue = #{inQueue} and force_start = #{forceStart} + order by priority desc + limit 1