You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/06/21 05:04:57 UTC
[GitHub] [dolphinscheduler] ruanwenjun commented on a diff in pull request #10516: Optimize master log, use MDC to inject workflow instance id and task instance id in log
ruanwenjun commented on code in PR #10516:
URL: https://github.com/apache/dolphinscheduler/pull/10516#discussion_r902165409
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/processor/queue/StateEventResponseService.java:
##########
@@ -109,18 +113,21 @@ protected StateEventResponseWorker() {
@Override
public void run() {
-
+ logger.info("State event loop service started");
while (Stopper.isRunning()) {
try {
// if not task , blocking here
StateEvent stateEvent = eventQueue.take();
+ MDC.put(Constants.WORKFLOW_INFO_MDC_KEY, String.format(Constants.WORKFLOW_TASK_HEADER_FORMAT, stateEvent.getProcessInstanceId(), stateEvent.getTaskInstanceId()));
persist(stateEvent);
+ MDC.remove(Constants.WORKFLOW_INFO_MDC_KEY);
Review Comment:
Done
--
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