This is an automated email from the ASF dual-hosted git repository.
hellostephen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new ad9c0d09511 [debug](agent-task) Add some log to observe finish task
rpc (#47872)
ad9c0d09511 is described below
commit ad9c0d09511c46a82c1dd68e0813d3a84d9f2793
Author: Siyang Tang <[email protected]>
AuthorDate: Thu Feb 13 18:48:23 2025 +0800
[debug](agent-task) Add some log to observe finish task rpc (#47872)
---
.../main/java/org/apache/doris/master/MasterImpl.java | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/master/MasterImpl.java
b/fe/fe-core/src/main/java/org/apache/doris/master/MasterImpl.java
index ba0657e78fb..10bb849f88c 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/master/MasterImpl.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/master/MasterImpl.java
@@ -85,6 +85,21 @@ public class MasterImpl {
}
public TMasterResult finishTask(TFinishTaskRequest request) {
+ TMasterResult result = null;
+ long startTime = System.currentTimeMillis();
+ try {
+ result = finishTaskInternal(request);
+ return result;
+ } finally {
+ long endTime = System.currentTimeMillis();
+ long duration = endTime - startTime;
+ if (result != null && duration > 1000L) {
+ LOG.warn("Finish task rpc exceeded 1s, request={}, result={}",
request, result);
+ }
+ }
+ }
+
+ public TMasterResult finishTaskInternal(TFinishTaskRequest request) {
TMasterResult result = new TMasterResult();
TStatus tStatus = new TStatus(TStatusCode.OK);
result.setStatus(tStatus);
@@ -128,6 +143,8 @@ public class MasterImpl {
List<String> errorMsgs = new ArrayList<String>();
errorMsgs.add(errMsg);
tStatus.setErrorMsgs(errorMsgs);
+ } else {
+ LOG.warn("Finish task rpc got null task for request={}",
request);
}
return result;
} else {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]