This is an automated email from the ASF dual-hosted git repository.
leonbao pushed a commit to branch 2.0-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/2.0-prepare by this push:
new 07119bc 6471: cache process definition in master (#6511) (#6519)
07119bc is described below
commit 07119bc17fb355382863edabf4b484404794eabe
Author: Kirs <[email protected]>
AuthorDate: Wed Oct 13 11:58:14 2021 +0800
6471: cache process definition in master (#6511) (#6519)
Co-authored-by: OS <[email protected]>
---
.../org/apache/dolphinscheduler/service/process/ProcessService.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
a/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
b/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
index a92302e..3d628e1 100644
---
a/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
+++
b/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
@@ -1237,7 +1237,7 @@ public class ProcessService {
CommandType commandType = getSubCommandType(parentProcessInstance,
childInstance);
Map<String, String> subProcessParam =
JSONUtils.toMap(task.getTaskParams());
int childDefineId =
Integer.parseInt(subProcessParam.get(Constants.CMD_PARAM_SUB_PROCESS_DEFINE_ID));
- ProcessDefinition processDefinition =
processDefineMapper.queryByDefineId(childDefineId);
+ ProcessDefinition subProcessDefinition =
processDefineMapper.queryByDefineId(childDefineId);
Object localParams = subProcessParam.get(Constants.LOCAL_PARAMS);
List<Property> allParam =
JSONUtils.toList(JSONUtils.toJsonString(localParams), Property.class);
@@ -1255,7 +1255,7 @@ public class ProcessService {
TaskDependType.TASK_POST,
parentProcessInstance.getFailureStrategy(),
parentProcessInstance.getExecutorId(),
- processDefinition.getCode(),
+ subProcessDefinition.getCode(),
processParam,
parentProcessInstance.getWarningType(),
parentProcessInstance.getWarningGroupId(),
@@ -1265,7 +1265,7 @@ public class ProcessService {
parentProcessInstance.getProcessInstancePriority(),
parentProcessInstance.getDryRun(),
subProcessInstanceId,
- parentProcessInstance.getProcessDefinitionVersion()
+ subProcessDefinition.getVersion()
);
}