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;