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

kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new 996c6d65354 [minor](stats) Report error with more friendly meesage 
when timeout #27197 (#27240)
996c6d65354 is described below

commit 996c6d653548996568378f5e5370412117d75ed6
Author: AKIRA <[email protected]>
AuthorDate: Mon Nov 20 00:12:44 2023 +0900

    [minor](stats) Report error with more friendly meesage when timeout #27197 
(#27240)
---
 .../src/main/java/org/apache/doris/statistics/AnalysisManager.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/statistics/AnalysisManager.java 
b/fe/fe-core/src/main/java/org/apache/doris/statistics/AnalysisManager.java
index a7eed48c469..91f54208f6a 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/statistics/AnalysisManager.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/statistics/AnalysisManager.java
@@ -92,7 +92,7 @@ import java.util.TreeMap;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.SynchronousQueue;
+import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 import java.util.function.Function;
@@ -677,7 +677,7 @@ public class AnalysisManager implements Writable {
         return new ThreadPoolExecutor(0,
                 
ConnectContext.get().getSessionVariable().parallelSyncAnalyzeTaskNum,
                 0, TimeUnit.SECONDS,
-                new SynchronousQueue(),
+                new LinkedBlockingQueue<>(),
                 new ThreadFactoryBuilder().setDaemon(true).setNameFormat("SYNC 
ANALYZE" + "-%d")
                         .build(), new BlockedPolicy(poolName,
                 StatisticsUtil.getAnalyzeTimeout()));
@@ -831,6 +831,9 @@ public class AnalysisManager implements Writable {
                 LOG.warn("Thread got interrupted when waiting sync analyze 
task execution finished", t);
             }
             if (!colNames.isEmpty()) {
+                if (cancelled) {
+                    throw new RuntimeException("Cancelled");
+                }
                 throw new RuntimeException("Failed to analyze following 
columns:[" + String.join(",", colNames)
                         + "] Reasons: " + String.join(",", errorMessages));
             }


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

Reply via email to