Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
Expand Up@@ -92,7 +92,7 @@
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;
Expand DownExpand Up@@ -677,7 +677,7 @@ private ThreadPoolExecutor createThreadPoolForSyncAnalyze() {
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()));
Expand DownExpand Up@@ -831,6 +831,9 @@ public void execute(ThreadPoolExecutor executor) {
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));
}
Expand Down