You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "det101 (via GitHub)" <gi...@apache.org> on 2025/10/28 02:04:27 UTC
Re: [PR] [Feature-10472][Master] Supplemental workflow instance trace id in log [dolphinscheduler]
det101 commented on code in PR #17605:
URL: https://github.com/apache/dolphinscheduler/pull/17605#discussion_r2467627015
##########
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/executor/PhysicalTaskEngineDelegator.java:
##########
@@ -74,6 +74,18 @@ public void ackPhysicalTaskExecutorLifecycleEventACK(final ITaskExecutorLifecycl
physicalTaskExecutorEventReporter.receiveTaskExecutorLifecycleEventACK(taskExecutorLifecycleEventAck);
}
+ public int getWorkflowInstanceId(final int taskInstanceId) {
+ final Optional<ITaskExecutor> taskExecutorOptional = physicalTaskExecutorRepository.get(taskInstanceId);
+ if (!taskExecutorOptional.isPresent()) {
+ return 0;
+ }
+ final TaskExecutionContext taskExecutionContext = taskExecutorOptional.get().getTaskExecutionContext();
+ if (taskExecutionContext == null) {
+ return 0;
+ }
+ return taskExecutionContext.getWorkflowInstanceId();
+ }
Review Comment:
The Worker does not need to be aware of the workflowInstanceId, so I will delete this method.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org