From d089a5627280181a746d9183d28b1705906ac9d2 Mon Sep 17 00:00:00 2001 From: Duc Canh Le Date: Tue, 10 Sep 2024 05:51:48 +0000 Subject: [PATCH] only set max_free_threads_ = 0 when creating pool Signed-off-by: Duc Canh Le --- src/Interpreters/ConcurrentHashJoin.cpp | 5 ++--- src/Interpreters/ConcurrentHashJoin.h | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Interpreters/ConcurrentHashJoin.cpp b/src/Interpreters/ConcurrentHashJoin.cpp index 81ccd6657ea..098189b224a 100644 --- a/src/Interpreters/ConcurrentHashJoin.cpp +++ b/src/Interpreters/ConcurrentHashJoin.cpp @@ -82,13 +82,12 @@ ConcurrentHashJoin::ConcurrentHashJoin( : context(context_) , table_join(table_join_) , slots(toPowerOfTwo(std::min(static_cast(slots_), 256))) - , max_threads(context->getSettingsRef().max_threads > 0 ? std::min(slots, context->getSettingsRef().max_threads.value) : slots) , pool(std::make_unique( CurrentMetrics::ConcurrentHashJoinPoolThreads, CurrentMetrics::ConcurrentHashJoinPoolThreadsActive, CurrentMetrics::ConcurrentHashJoinPoolThreadsScheduled, - /*max_threads_*/ max_threads, - /*max_free_threads_*/ max_threads, + /*max_threads_*/ slots, + /*max_free_threads_*/ 0, /*queue_size_*/ slots)) , stats_collecting_params(stats_collecting_params_) { diff --git a/src/Interpreters/ConcurrentHashJoin.h b/src/Interpreters/ConcurrentHashJoin.h index 3dae8e5b6c3..a911edaccc3 100644 --- a/src/Interpreters/ConcurrentHashJoin.h +++ b/src/Interpreters/ConcurrentHashJoin.h @@ -70,7 +70,6 @@ private: ContextPtr context; std::shared_ptr table_join; size_t slots; - size_t max_threads; std::unique_ptr pool; std::vector> hash_joins;