This is an automated email from the ASF dual-hosted git repository.

yiguolei 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 48d7df205f7 [chore](log) Add more detail msg for waitRPC exception 
#27771
48d7df205f7 is described below

commit 48d7df205f7c57980a44e3f14e84d731e0e7cabb
Author: zhiqiang <[email protected]>
AuthorDate: Fri Dec 1 11:59:47 2023 +0800

    [chore](log) Add more detail msg for waitRPC exception #27771
---
 .../main/java/org/apache/doris/qe/Coordinator.java | 26 +++++++++++++++++-----
 1 file changed, 20 insertions(+), 6 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java 
b/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java
index cf34283fa95..a0bced26e1b 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java
@@ -945,8 +945,12 @@ public class Coordinator implements CoordInterface {
                          long leftTimeMs,
             String operation) throws RpcException, UserException {
         if (leftTimeMs <= 0) {
-            throw new UserException("timeout before waiting for " + operation 
+ " RPC. Elapse(sec): " + (
-                    (System.currentTimeMillis() - timeoutDeadline) / 1000 + 
queryOptions.getExecutionTimeout()));
+            long elapsed = (System.currentTimeMillis() - timeoutDeadline) / 
1000 + queryOptions.getExecutionTimeout();
+            String msg = String.format(
+                    "timeout before waiting %s rpc, query timeout:%d, already 
elapsed:%d, left for this:%d",
+                        operation, queryOptions.getExecutionTimeout(), 
elapsed, leftTimeMs);
+            LOG.warn("Query {} {}", DebugUtil.printId(queryId), msg);
+            throw new UserException(msg);
         }
 
         long timeoutMs = Math.min(leftTimeMs, 
Config.remote_fragment_exec_timeout_ms);
@@ -974,7 +978,10 @@ public class Coordinator implements CoordInterface {
                 code = TStatusCode.INTERNAL_ERROR;
             } catch (TimeoutException e) {
                 exception = e;
-                errMsg = "timeout when waiting for " + operation + " RPC. 
Wait(sec): " + timeoutMs / 1000;
+                errMsg = String.format(
+                    "timeout when waiting for %s rpc, query timeout:%d, left 
timeout for this operation:%d",
+                    operation, queryOptions.getExecutionTimeout(), timeoutMs / 
1000);
+                LOG.warn("Query {} {}", DebugUtil.printId(queryId), errMsg);
                 code = TStatusCode.TIMEOUT;
             }
 
@@ -1005,8 +1012,12 @@ public class Coordinator implements CoordInterface {
             Future<PExecPlanFragmentResult>>> futures, long leftTimeMs,
             String operation) throws RpcException, UserException {
         if (leftTimeMs <= 0) {
-            throw new UserException("timeout before waiting for " + operation 
+ " RPC. Elapse(sec): " + (
-                    (System.currentTimeMillis() - timeoutDeadline) / 1000 + 
queryOptions.query_timeout));
+            long elapsed = (System.currentTimeMillis() - timeoutDeadline) / 
1000 + queryOptions.getExecutionTimeout();
+            String msg = String.format(
+                    "timeout before waiting %s rpc, query timeout:%d, already 
elapsed:%d, left for this:%d",
+                    operation, queryOptions.getExecutionTimeout(), elapsed, 
leftTimeMs);
+            LOG.warn("Query {} {}", DebugUtil.printId(queryId), msg);
+            throw new UserException(msg);
         }
 
         long timeoutMs = Math.min(leftTimeMs, 
Config.remote_fragment_exec_timeout_ms);
@@ -1034,7 +1045,10 @@ public class Coordinator implements CoordInterface {
                 code = TStatusCode.INTERNAL_ERROR;
             } catch (TimeoutException e) {
                 exception = e;
-                errMsg = "timeout when waiting for " + operation + " RPC. 
Wait(sec): " + timeoutMs / 1000;
+                errMsg = String.format(
+                    "timeout when waiting for %s rpc, query timeout:%d, left 
timeout for this operation:%d",
+                                            operation, 
queryOptions.getExecutionTimeout(), timeoutMs / 1000);
+                LOG.warn("Query {} {}", DebugUtil.printId(queryId), errMsg);
                 code = TStatusCode.TIMEOUT;
             }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to