This is an automated email from the ASF dual-hosted git repository.
journey pushed a commit to branch 1.3.2-release
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git
The following commit(s) were added to refs/heads/1.3.2-release by this push:
new 46f0586 If worker group id is null,don't need to set the value of the
worker group (#3460)
46f0586 is described below
commit 46f058698170fff573bbd02af74762ded639769c
Author: lgcareer <[email protected]>
AuthorDate: Tue Aug 11 10:42:59 2020 +0800
If worker group id is null,don't need to set the value of the worker group
(#3460)
* [Fix-3423][dao][sql]Fixed that the resource file of the task node can't
be found when upgrade from 1.2.0 to 1.3.x
* [Fix-3423][dao]If worker group id is null,don't need to set the value of
the worker group
---
.../org/apache/dolphinscheduler/dao/upgrade/UpgradeDao.java | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git
a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/upgrade/UpgradeDao.java
b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/upgrade/UpgradeDao.java
index 59c2cbc..3d35b68 100644
---
a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/upgrade/UpgradeDao.java
+++
b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/upgrade/UpgradeDao.java
@@ -297,11 +297,14 @@ public abstract class UpgradeDao extends AbstractBaseDao {
for (int i = 0 ;i < tasks.size() ; i++){
JSONObject task = tasks.getJSONObject(i);
Integer workerGroupId = task.getInteger("workerGroupId");
- if (workerGroupId == null || workerGroupId == -1) {
- task.put("workerGroup", "default");
- }else {
- task.put("workerGroup",
oldWorkerGroupMap.get(workerGroupId));
+ if (workerGroupId != null) {
+ if (workerGroupId == -1) {
+ task.put("workerGroup", "default");
+ } else {
+ task.put("workerGroup",
oldWorkerGroupMap.get(workerGroupId));
+ }
}
+
}
jsonObject.remove(jsonObject.getString("tasks"));