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

gabriellee 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 f40364f5a58 [fix](exception) Use normal exception to represent query 
timeout (#51994)
f40364f5a58 is described below

commit f40364f5a58433ea5e5c3f6e877bec7c1b92c3a0
Author: Gabriel <[email protected]>
AuthorDate: Mon Jun 23 10:03:08 2025 +0800

    [fix](exception) Use normal exception to represent query timeout (#51994)
    
    Query timeout should throw a normal exception instead of UserException
    which misleading users to believe that this is a behavior exception
---
 fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java | 10 +++++-----
 1 file changed, 5 insertions(+), 5 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 8fbc8b383a6..329dd4c2289 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
@@ -780,7 +780,7 @@ public class Coordinator implements CoordInterface {
         sendPipelineCtx();
     }
 
-    protected void sendPipelineCtx() throws TException, RpcException, 
UserException {
+    protected void sendPipelineCtx() throws Exception {
         lock();
         try {
             Multiset<TNetworkAddress> hostCounter = HashMultiset.create();
@@ -943,7 +943,7 @@ public class Coordinator implements CoordInterface {
 
     protected Map<TNetworkAddress, List<Long>>  
waitPipelineRpc(List<Pair<Long, Triple<PipelineExecContexts,
             BackendServiceProxy, 
Future<InternalService.PExecPlanFragmentResult>>>> futures, long leftTimeMs,
-            String operation) throws RpcException, UserException {
+            String operation) throws Exception {
         if (leftTimeMs <= 0) {
             long currentTimeMillis = System.currentTimeMillis();
             long elapsed = (currentTimeMillis - timeoutDeadline) / 1000 + 
queryOptions.getExecutionTimeout();
@@ -960,7 +960,7 @@ public class Coordinator implements CoordInterface {
                         queryOptions.isSetQueryTimeout(), 
queryOptions.getQueryTimeout(),
                         timeoutDeadline, currentTimeMillis);
             }
-            throw new UserException(msg);
+            throw new Exception(msg);
         }
 
         // BE -> (RPC latency from FE to BE, Execution latency on bthread, 
Duration of doing work, RPC latency from BE
@@ -1030,7 +1030,7 @@ public class Coordinator implements CoordInterface {
                         SimpleScheduler.addToBlacklist(triple.getLeft().beId, 
errMsg);
                         throw new 
RpcException(triple.getLeft().brpcAddr.hostname, errMsg, exception);
                     default:
-                        throw new UserException(errMsg, exception);
+                        throw new Exception(errMsg, exception);
                 }
             }
         }
@@ -1184,7 +1184,7 @@ public class Coordinator implements CoordInterface {
             } else {
                 String errMsg = copyStatus.getErrorMsg();
                 LOG.warn("Query {} failed: {}", DebugUtil.printId(queryId), 
errMsg);
-                throw new UserException(errMsg);
+                throw new Exception(errMsg);
             }
         }
 


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

Reply via email to