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/09/28 09:11:24 UTC
[GitHub] [dolphinscheduler] ruanwenjun commented on a diff in pull request #12183: [DS-12154][worker] Optimize the log printing of the worker module acc…
ruanwenjun commented on code in PR #12183:
URL: https://github.com/apache/dolphinscheduler/pull/12183#discussion_r982146215
##########
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskDispatchProcessor.java:
##########
@@ -95,7 +95,7 @@ public void process(Channel channel, Command command) {
return;
}
final String workflowMasterAddress = taskDispatchCommand.getMessageSenderAddress();
- logger.info("task execute request message: {}", taskDispatchCommand);
+ logger.info("Receive task execute request message: {}", taskDispatchCommand);
Review Comment:
```suggestion
logger.info("Receive task dispatch request, command: {}", taskDispatchCommand);
```
##########
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskRejectAckProcessor.java:
##########
@@ -47,8 +47,11 @@ public void process(Channel channel, Command command) {
TaskRejectAckCommand taskRejectAckMessage = JSONUtils.parseObject(command.getBody(),
TaskRejectAckCommand.class);
if (taskRejectAckMessage == null) {
+ logger.warn("Task reject response ack command is null");
return;
}
+
+ logger.info("Receive task reject response ack command: {}", taskRejectAckMessage);
Review Comment:
Move this log after
```
LoggerUtils.setTaskInstanceIdMDC(taskRejectAckMessage.getTaskInstanceId());
```
##########
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskSavePointProcessor.java:
##########
@@ -76,9 +77,14 @@ public void process(Channel channel, Command command) {
return;
}
- doSavePoint(taskInstanceId);
+ try {
+ LoggerUtils.setTaskInstanceIdMDC(taskSavePointRequestCommand.getTaskInstanceId());
Review Comment:
```suggestion
LoggerUtils.setTaskInstanceIdMDC(taskInstanceId);
```
##########
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/runner/WorkerManagerThread.java:
##########
@@ -93,6 +93,7 @@ public void killTaskBeforeExecuteByInstanceId(Integer taskInstanceId) {
public boolean offer(WorkerDelayTaskExecuteRunnable workerDelayTaskExecuteRunnable) {
if (waitSubmitQueue.size() > workerExecThreads) {
+ logger.info("Wait submit queue is full, will retry submit task later");
Review Comment:
```suggestion
logger.warn("Wait submit queue is full, will retry submit task later");
```
##########
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskRejectAckProcessor.java:
##########
@@ -47,8 +47,11 @@ public void process(Channel channel, Command command) {
TaskRejectAckCommand taskRejectAckMessage = JSONUtils.parseObject(command.getBody(),
TaskRejectAckCommand.class);
if (taskRejectAckMessage == null) {
+ logger.warn("Task reject response ack command is null");
Review Comment:
```suggestion
logger.error("Receive task reject response, the response message is null");
```
##########
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskExecuteResultAckProcessor.java:
##########
@@ -54,7 +54,7 @@ public void process(Channel channel, Command command) {
logger.error("task execute response ack command is null");
return;
}
- logger.info("task execute response ack command : {}", taskExecuteAckMessage);
+ logger.info("Receive task execute response ack command : {}", taskExecuteAckMessage);
Review Comment:
Please move this log after `LoggerUtils.setTaskInstanceIdMDC(taskExecuteAckMessage.getTaskInstanceId());`
This will add traceId in log header.
--
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