SbloodyS commented on code in PR #17614:
URL:
https://github.com/apache/dolphinscheduler/pull/17614#discussion_r2498258906
##########
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/TaskGroupQueueMapper.xml:
##########
@@ -260,4 +260,10 @@
limit #{limit}
</select>
+ <select id="queryByWorkflowInstanceId"
resultType="org.apache.dolphinscheduler.dao.entity.TaskGroupQueue">
+ select
+ <include refid="baseSql" />
+ from t_ds_task_group_queue
+ where workflow_instance_id = #{workflowInstanceId}
+ </select>
Review Comment:
We should remove this.
##########
dolphinscheduler-master/src/test/resources/it/start/workflow_with_one_fake_task_failed_with_retry_using_task_group.yaml:
##########
@@ -0,0 +1,76 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+project:
+ name: MasterIntegrationTest
+ code: 1
+ description: This is a fake project
+ userId: 1
+ userName: admin
+ createTime: 2024-08-12 00:00:00
+ updateTime: 2021-08-12 00:00:00
+
+workflows:
+ - name: workflow_with_one_fake_task_failed_using_task_group
+ code: 1
+ version: 1
+ projectCode: 1
+ description: This is a fake workflow with single task
+ releaseState: ONLINE
+ createTime: 2024-08-12 00:00:00
+ updateTime: 2021-08-12 00:00:00
+ userId: 1
+ executionType: PARALLEL
+
+tasks:
+ - name: A
+ code: 1
+ version: 1
+ projectCode: 1
+ userId: 1
+ taskType: LogicFakeTask
+ taskParams: '{"localParams":null,"varPool":[],"shellScript":"sleep 5 &&
xx"}'
+ workerGroup: default
+ taskGroupId: 1
+ taskGroupPriority: 1
+ failRetryTimes: 1
+ failRetryInterval: 1
+ createTime: 2024-08-12 00:00:00
+ updateTime: 2021-08-12 00:00:00
+ taskExecuteType: BATCH
+
+taskRelations:
+ - projectCode: 1
+ workflowDefinitionCode: 1
+ workflowDefinitionVersion: 1
+ preTaskCode: 0
+ preTaskVersion: 0
+ postTaskCode: 1
+ postTaskVersion: 1
+ createTime: 2024-08-12 00:00:00
+ updateTime: 2024-08-12 00:00:00
+
+taskGroups:
+ - id: 1
+ name: default
+ projectCode: 1
+ groupSize: 2
+ useSize: 0
+ userId: 1
+ status: YES
+ createTime: 2024-08-12 00:00:00
+ updateTime: 2021-08-12 00:00:00
Review Comment:
```suggestion
updateTime: 2021-08-12 00:00:00
```
We should leave an blank line at the end of each file.
##########
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/repository/impl/TaskGroupQueueDaoImpl.java:
##########
@@ -92,4 +92,9 @@ public List<TaskGroupQueue>
queryWaitNotifyForceStartTaskGroupQueue(int minTaskG
minTaskGroupQueueId,
limit);
}
+
+ @Override
+ public List<TaskGroupQueue> queryByWorkflowInstanceId(Integer
workflowInstanceId) {
+ return mybatisMapper.queryByWorkflowInstanceId(workflowInstanceId);
+ }
Review Comment:
Remove this.
##########
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/repository/TaskGroupQueueDao.java:
##########
@@ -92,4 +92,13 @@ public interface TaskGroupQueueDao extends
IDao<TaskGroupQueue> {
* @return TaskGroupQueue ordered by priority desc
*/
List<TaskGroupQueue> queryWaitNotifyForceStartTaskGroupQueue(int
minTaskGroupQueueId, int limit);
+
+ /**
+ * Query all {@link TaskGroupQueue} belonging to the specified workflow
instance.
+ *
+ * @param workflowInstanceId workflowInstanceId
+ * @return TaskGroupQueue
+ */
+ List<TaskGroupQueue> queryByWorkflowInstanceId(Integer workflowInstanceId);
Review Comment:
Remove this.
##########
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/TaskGroupQueueMapper.java:
##########
@@ -136,4 +136,6 @@ List<TaskGroupQueue>
queryWaitNotifyForceStartTaskGroupQueue(@Param("inQueue") i
@Param("forceStart") int forceStart,
@Param("minTaskGroupQueueId") int minTaskGroupQueueId,
@Param("limit") int limit);
+
+ List<TaskGroupQueue>
queryByWorkflowInstanceId(@Param("workflowInstanceId") Integer
workflowInstanceId);
Review Comment:
Remove this.
--
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]