Browse Source

Fix notify failover WorkflowInstance will cause NPE (#15499)

3.2.1-prepare
Wenjun Ruan 10 months ago committed by GitHub
parent
commit
603dfa2e4b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 10
      dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java

10
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java

@ -490,6 +490,16 @@ public class WorkflowExecuteRunnable implements IWorkflowExecuteRunnable {
} else {
ProcessInstance processInstance =
processService.findProcessInstanceById(nextTaskInstance.getProcessInstanceId());
if (processInstance == null) {
log.error("WorkflowInstance is null cannot wakeup, processInstanceId:{}",
nextTaskInstance.getProcessInstanceId());
return;
}
if (processInstance.getHost() == null || Constants.NULL.equals(processInstance.getHost())) {
log.warn("The next WorkflowInstance: {} host is null no need to wakeup, maybe it is in failover",
processInstance);
return;
}
ILogicTaskInstanceOperator taskInstanceOperator = SingletonJdkDynamicRpcClientProxyFactory
.getProxyClient(processInstance.getHost(), ILogicTaskInstanceOperator.class);
taskInstanceOperator.wakeupTaskInstance(

Loading…
Cancel
Save