Browse Source

fix dead loop in StateEventResponseWorker (#6281)

2.0.7-release
Wenjun Ruan 3 years ago committed by GitHub
parent
commit
ebb56b2620
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/processor/StateEventProcessor.java
  2. 3
      dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/processor/queue/StateEventResponseService.java

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

@ -68,7 +68,7 @@ public class StateEventProcessor implements NettyRequestProcessor {
StateEventType type = stateEvent.getTaskInstanceId() == 0 ? StateEventType.PROCESS_STATE_CHANGE : StateEventType.TASK_STATE_CHANGE;
stateEvent.setType(type);
logger.info("received command : {}", stateEvent.toString());
logger.info("received command : {}", stateEvent);
stateEventResponseService.addResponse(stateEvent);
}

3
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/processor/queue/StateEventResponseService.java

@ -114,6 +114,7 @@ public class StateEventResponseService {
} catch (InterruptedException e) {
logger.warn("persist task error", e);
Thread.currentThread().interrupt();
break;
}
}
logger.info("StateEventResponseWorker stopped");
@ -139,7 +140,7 @@ public class StateEventResponseService {
workflowExecuteThread.addStateEvent(stateEvent);
writeResponse(stateEvent, ExecutionStatus.SUCCESS);
} catch (Exception e) {
logger.error("persist event queue error:", stateEvent.toString(), e);
logger.error("persist event queue error, event: {}", stateEvent, e);
}
}

Loading…
Cancel
Save