This is an automated email from the ASF dual-hosted git repository.
lidongdai pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new 652d690 [DS-6362][fix] fix switch process definition version failed
(#6363)
652d690 is described below
commit 652d690976aadff7519cf76664cd36f0e7a67cc3
Author: ououtt <[email protected]>
AuthorDate: Mon Sep 27 00:30:59 2021 +0800
[DS-6362][fix] fix switch process definition version failed (#6363)
---
.../dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java | 2 +-
.../org/apache/dolphinscheduler/service/process/ProcessService.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
index ba467f0..fc2a2ac 100644
---
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
+++
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
@@ -1395,7 +1395,7 @@ public class ProcessDefinitionServiceImpl extends
BaseServiceImpl implements Pro
return result;
}
int switchVersion = processService.switchVersion(processDefinition,
processDefinitionLog);
- if (switchVersion > 0) {
+ if (switchVersion <= 0) {
putMsg(result, Status.SWITCH_PROCESS_DEFINITION_VERSION_ERROR);
throw new
ServiceException(Status.SWITCH_PROCESS_DEFINITION_VERSION_ERROR);
}
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 cbd4f38..c1e392b 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
@@ -2212,7 +2212,7 @@ public class ProcessService {
int result = processDefineMapper.updateById(processDefinitionLog);
if (result > 0) {
- result = switchProcessTaskRelationVersion(processDefinition);
+ result = switchProcessTaskRelationVersion(processDefinitionLog);
if (result <= 0) {
return Constants.DEFINITION_FAILURE;
}