SbloodyS commented on code in PR #16790:
URL: 
https://github.com/apache/dolphinscheduler/pull/16790#discussion_r1853139535


##########
docs/docs/zh/guide/upgrade/incompatible.md:
##########
@@ -32,4 +32,5 @@
 * 废弃从 1.x 至 2.x 的升级代码  
([#16543])(https://github.com/apache/dolphinscheduler/pull/16543)
 * 移除 `数据质量` 模块  
([#16794])(https://github.com/apache/dolphinscheduler/pull/16794)
 * 在`application.yaml`中移除`registry-disconnect-strategy`配置 
([#16821])(https://github.com/apache/dolphinscheduler/pull/16821)
+* 
在worker`application.yaml`中移除exec-threads,使用physical-task-config替代;在master`application.yaml`中移除master-async-task-executor-thread-pool-size使用logic-task-config替代
 ([#16790])(https://github.com/apache/dolphinscheduler/pull/16790)

Review Comment:
   ```suggestion
   * 
在`worker`的`application.yaml`中移除exec-threads,使用`physical-task-config`替代。在`master`的`application.yaml`中移除`master-async-task-executor-thread-pool-size`使用`logic-task-config`替代
 ([#16790])(https://github.com/apache/dolphinscheduler/pull/16790)
   ```



##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/executor/plugin/dynamic/DynamicLogicTask.java:
##########
@@ -100,28 +102,27 @@ public DynamicLogicTask(TaskExecutionContext 
taskExecutionContext,
         this.taskInstance = 
taskInstanceDao.queryById(taskExecutionContext.getTaskInstanceId());
     }
 
-    @Override
-    public AsyncTaskExecuteFunction getAsyncTaskExecuteFunction() throws 
MasterTaskExecuteException {
-        List<Map<String, String>> parameterGroup = generateParameterGroup();
-
-        if (parameterGroup.size() > 
taskParameters.getMaxNumOfSubWorkflowInstances()) {
-            log.warn("the number of sub process instances [{}] exceeds the 
maximum limit [{}]", parameterGroup.size(),
-                    taskParameters.getMaxNumOfSubWorkflowInstances());
-            parameterGroup = parameterGroup.subList(0, 
taskParameters.getMaxNumOfSubWorkflowInstances());
-        }
-
-        // if already exists sub process instance, do not generate again
-        List<WorkflowInstance> existsSubWorkflowInstanceList =
-                
subWorkflowService.getAllDynamicSubWorkflow(workflowInstance.getId(), 
taskInstance.getTaskCode());
-        if (CollectionUtils.isEmpty(existsSubWorkflowInstanceList)) {
-            generateSubWorkflowInstance(parameterGroup);
-        } else {
-            resetProcessInstanceStatus(existsSubWorkflowInstanceList);
-        }
-        return new DynamicAsyncTaskExecuteFunction(taskExecutionContext, 
workflowInstance, taskInstance, this,
-                commandMapper,
-                subWorkflowService, taskParameters.getDegreeOfParallelism());
-    }
+    // public AsyncTaskExecuteFunction getAsyncTaskExecuteFunction() throws 
MasterTaskExecuteException {
+    // List<Map<String, String>> parameterGroup = generateParameterGroup();
+    //
+    // if (parameterGroup.size() > 
dynamicParameters.getMaxNumOfSubWorkflowInstances()) {
+    // log.warn("the number of sub process instances [{}] exceeds the maximum 
limit [{}]", parameterGroup.size(),
+    // dynamicParameters.getMaxNumOfSubWorkflowInstances());
+    // parameterGroup = parameterGroup.subList(0, 
dynamicParameters.getMaxNumOfSubWorkflowInstances());
+    // }
+    //
+    // // if already exists sub process instance, do not generate again
+    // List<WorkflowInstance> existsSubWorkflowInstanceList =
+    // subWorkflowService.getAllDynamicSubWorkflow(workflowInstance.getId(), 
taskInstance.getTaskCode());
+    // if (CollectionUtils.isEmpty(existsSubWorkflowInstanceList)) {
+    // generateSubWorkflowInstance(parameterGroup);
+    // } else {
+    // resetProcessInstanceStatus(existsSubWorkflowInstanceList);
+    // }
+    // return new DynamicAsyncTaskExecuteFunction(taskExecutionContext, 
workflowInstance, taskInstance, this,
+    // commandMapper,
+    // subWorkflowService, dynamicParameters.getDegreeOfParallelism());
+    // }

Review Comment:
   Please remove unnessnary comment.



##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/system/event/GlobalMasterFailoverEvent.java:
##########
@@ -29,7 +29,7 @@ public class GlobalMasterFailoverEvent extends 
AbstractSystemEvent {
     private final Date eventTime;
 
     public GlobalMasterFailoverEvent(Date eventTime) {
-        super(eventTime.getTime());
+        super(0);

Review Comment:
   Please using constant here instead of hard code.



##########
docs/docs/en/guide/upgrade/incompatible.md:
##########
@@ -34,4 +34,5 @@ This document records the incompatible updates between each 
version. You need to
 * Deprecated upgrade code of 1.x and 2.x 
([#16543])(https://github.com/apache/dolphinscheduler/pull/16543)
 * Remove the `Data Quality` module 
([#16794])(https://github.com/apache/dolphinscheduler/pull/16794)
 * Remove the `registry-disconnect-strategy` in `application.yaml` 
([#16821])(https://github.com/apache/dolphinscheduler/pull/16821)
+* Remove `exec-threads` in worker's `application.yaml`, please use 
`physical-task-config`;Remove `master-async-task-executor-thread-pool-size` in 
master's `application.yaml`, please use `logic-task-config` 
([#16790])(https://github.com/apache/dolphinscheduler/pull/16790)

Review Comment:
   ```suggestion
   * Remove `exec-threads` in worker's `application.yaml`, please use 
`physical-task-config`. Remove `master-async-task-executor-thread-pool-size` in 
master's `application.yaml`, please use `logic-task-config` 
([#16790])(https://github.com/apache/dolphinscheduler/pull/16790)
   ```



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