From c5fdcaa12c24ae48d11b149539a97585bde6b100 Mon Sep 17 00:00:00 2001 From: lenboo Date: Wed, 17 Nov 2021 00:26:26 +0800 Subject: [PATCH 1/4] add is start check.. --- .../server/master/runner/EventExecuteService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/EventExecuteService.java b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/EventExecuteService.java index 7c4b32130d..eae5353175 100644 --- a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/EventExecuteService.java +++ b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/EventExecuteService.java @@ -118,6 +118,7 @@ public class EventExecuteService extends Thread { for (WorkflowExecuteThread workflowExecuteThread : this.processInstanceExecMaps.values()) { if (workflowExecuteThread.eventSize() == 0 || StringUtils.isEmpty(workflowExecuteThread.getKey()) + || !workflowExecuteThread.isStart() || eventHandlerMap.containsKey(workflowExecuteThread.getKey())) { continue; } From 4015448441398edb35d8a9c89257a64f324690d5 Mon Sep 17 00:00:00 2001 From: DingPengfei Date: Wed, 17 Nov 2021 15:03:53 +0800 Subject: [PATCH 2/4] fix bug of extra 'and' in ResourceMapper.xml (#6876) Co-authored-by: ding --- .../org/apache/dolphinscheduler/dao/mapper/ResourceMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ResourceMapper.xml b/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ResourceMapper.xml index 7a8b043c09..3d93c7ce2a 100644 --- a/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ResourceMapper.xml +++ b/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ResourceMapper.xml @@ -63,7 +63,7 @@ and ( - and d.id in + d.id in #{i} From 652b9230a726939144abc5278d9e5b0d8659cd22 Mon Sep 17 00:00:00 2001 From: OS <29528966+lenboo@users.noreply.github.com> Date: Wed, 17 Nov 2021 17:39:22 +0800 Subject: [PATCH 3/4] [BUG][Master] process cannot finish and its status is always running (#6886) * fix 6882: process cannot finish and its status is always running * fix 6882: process cannot finish and its status is always running --- .../server/master/runner/EventExecuteService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/EventExecuteService.java b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/EventExecuteService.java index eae5353175..4184ba0ca9 100644 --- a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/EventExecuteService.java +++ b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/EventExecuteService.java @@ -187,12 +187,13 @@ public class EventExecuteService extends Thread { StateEventChangeCommand stateEventChangeCommand = new StateEventChangeCommand( processInstanceId, 0, workflowExecuteThread.getProcessInstance().getState(), processInstance.getId(), taskInstance.getId() ); - stateEventCallbackService.sendResult(address, port, stateEventChangeCommand.convert2Command()); } @Override public void onFailure(Throwable throwable) { + logger.info("handle events {} failed.", processInstanceId); + logger.info("handle events failed.", throwable); } }; Futures.addCallback(future, futureCallback, this.listeningExecutorService); From 9a5b8edaf81cbf3b4e3d1a4f7f940c90f512b717 Mon Sep 17 00:00:00 2001 From: zwZjut Date: Tue, 16 Nov 2021 10:16:52 +0800 Subject: [PATCH 4/4] fix switchVersion error (#6783) (#6784) Co-authored-by: honghuo.zw Co-authored-by: Kirs --- .../api/service/impl/TaskDefinitionServiceImpl.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskDefinitionServiceImpl.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskDefinitionServiceImpl.java index deed94fd41..e203b9b66d 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskDefinitionServiceImpl.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskDefinitionServiceImpl.java @@ -282,10 +282,11 @@ public class TaskDefinitionServiceImpl extends BaseServiceImpl implements TaskDe putMsg(result, Status.TASK_DEFINE_NOT_EXIST, taskCode); return result; } - TaskDefinitionLog taskDefinitionLog = taskDefinitionLogMapper.queryByDefinitionCodeAndVersion(taskCode, version); - taskDefinitionLog.setUserId(loginUser.getId()); - taskDefinitionLog.setUpdateTime(new Date()); - int switchVersion = taskDefinitionMapper.updateById(taskDefinitionLog); + TaskDefinitionLog taskDefinitionUpdate = taskDefinitionLogMapper.queryByDefinitionCodeAndVersion(taskCode, version); + taskDefinitionUpdate.setUserId(loginUser.getId()); + taskDefinitionUpdate.setUpdateTime(new Date()); + taskDefinitionUpdate.setId(taskDefinition.getId()); + int switchVersion = taskDefinitionMapper.updateById(taskDefinitionUpdate); if (switchVersion > 0) { result.put(Constants.DATA_LIST, taskCode); putMsg(result, Status.SUCCESS);