Browse Source

[Bug-9295][Master] fix repeated submit task (#9304)

Co-authored-by: caishunfeng <534328519@qq.com>
3.0.0/version-upgrade
caishunfeng 3 years ago committed by GitHub
parent
commit
1073fcae44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumer.java
  2. 2
      dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/processor/queue/TaskExecuteThreadPool.java
  3. 2
      dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThreadPool.java

6
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumer.java

@ -186,8 +186,10 @@ public class TaskPriorityQueueConsumer extends Thread {
if (result) {
addDispatchEvent(context, executionContext);
}
} catch (RuntimeException | ExecuteException e) {
logger.error("dispatch error: {}", e.getMessage(), e);
} catch (RuntimeException e) {
logger.error("dispatch error: ", e);
} catch (ExecuteException e) {
logger.error("dispatch error: {}", e.getMessage());
}
return result;
}

2
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/processor/queue/TaskExecuteThreadPool.java

@ -110,8 +110,8 @@ public class TaskExecuteThreadPool extends ThreadPoolTaskExecutor {
return;
}
ListenableFuture future = this.submitListenable(() -> {
taskExecuteThread.run();
multiThreadFilterMap.put(taskExecuteThread.getKey(), taskExecuteThread);
taskExecuteThread.run();
});
future.addCallback(new ListenableFutureCallback() {
@Override

2
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThreadPool.java

@ -109,8 +109,8 @@ public class WorkflowExecuteThreadPool extends ThreadPoolTaskExecutor {
}
int processInstanceId = workflowExecuteThread.getProcessInstance().getId();
ListenableFuture future = this.submitListenable(() -> {
workflowExecuteThread.handleEvents();
multiThreadFilterMap.put(workflowExecuteThread.getKey(), workflowExecuteThread);
workflowExecuteThread.handleEvents();
});
future.addCallback(new ListenableFutureCallback() {
@Override

Loading…
Cancel
Save