From e4712babe785caee631cd2ee7092b4d97c6c7fd4 Mon Sep 17 00:00:00 2001 From: vthacker Date: Sun, 24 Sep 2023 11:52:47 -0700 Subject: [PATCH] use virtual threads for query execution --- .../java/com/slack/kaldb/chunkManager/ChunkManagerBase.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/kaldb/src/main/java/com/slack/kaldb/chunkManager/ChunkManagerBase.java b/kaldb/src/main/java/com/slack/kaldb/chunkManager/ChunkManagerBase.java index c4cc793480..885530ace0 100644 --- a/kaldb/src/main/java/com/slack/kaldb/chunkManager/ChunkManagerBase.java +++ b/kaldb/src/main/java/com/slack/kaldb/chunkManager/ChunkManagerBase.java @@ -68,11 +68,7 @@ private static ListeningExecutorService queryThreadPool() { return MoreExecutors.listeningDecorator( Executors.newFixedThreadPool( Math.max(1, Runtime.getRuntime().availableProcessors() - 2), - new ThreadFactoryBuilder() - .setNameFormat("chunk-manager-query-%d") - .setUncaughtExceptionHandler( - (t, e) -> LOG.error("Exception on thread {}: {}", t.getName(), e)) - .build())); + Thread.ofVirtual().name("chunk-manager-query-", 0).factory())); } /*