From ac04288e2b5a61738347696ac1fb844b627b579c Mon Sep 17 00:00:00 2001 From: sgw <2784266418@qq.com> Date: Sun, 27 Aug 2023 12:24:04 +0800 Subject: [PATCH] fix the full log path of logical task is not be set when task is dispatched (#14819) (#14821) --- .../master/rpc/LogicITaskInstanceDispatchOperationFunction.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/rpc/LogicITaskInstanceDispatchOperationFunction.java b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/rpc/LogicITaskInstanceDispatchOperationFunction.java index 22258c613b..d97cdea0aa 100644 --- a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/rpc/LogicITaskInstanceDispatchOperationFunction.java +++ b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/rpc/LogicITaskInstanceDispatchOperationFunction.java @@ -56,6 +56,8 @@ public class LogicITaskInstanceDispatchOperationFunction final int workflowInstanceId = taskExecutionContext.getProcessInstanceId(); final String taskInstanceName = taskExecutionContext.getTaskName(); + taskExecutionContext.setLogPath(LogUtils.getTaskInstanceLogFullPath(taskExecutionContext)); + LogUtils.setWorkflowAndTaskInstanceIDMDC(workflowInstanceId, taskInstanceId); LogUtils.setTaskInstanceLogFullPathMDC(taskExecutionContext.getLogPath());