mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-19 16:20:50 +00:00
only set max_free_threads_ = 0 when creating pool
Signed-off-by: Duc Canh Le <duccanh.le@ahrefs.com>
This commit is contained in:
parent
11478b949f
commit
d089a56272
@ -82,13 +82,12 @@ ConcurrentHashJoin::ConcurrentHashJoin(
|
|||||||
: context(context_)
|
: context(context_)
|
||||||
, table_join(table_join_)
|
, table_join(table_join_)
|
||||||
, slots(toPowerOfTwo(std::min<UInt32>(static_cast<UInt32>(slots_), 256)))
|
, slots(toPowerOfTwo(std::min<UInt32>(static_cast<UInt32>(slots_), 256)))
|
||||||
, max_threads(context->getSettingsRef().max_threads > 0 ? std::min(slots, context->getSettingsRef().max_threads.value) : slots)
|
|
||||||
, pool(std::make_unique<ThreadPool>(
|
, pool(std::make_unique<ThreadPool>(
|
||||||
CurrentMetrics::ConcurrentHashJoinPoolThreads,
|
CurrentMetrics::ConcurrentHashJoinPoolThreads,
|
||||||
CurrentMetrics::ConcurrentHashJoinPoolThreadsActive,
|
CurrentMetrics::ConcurrentHashJoinPoolThreadsActive,
|
||||||
CurrentMetrics::ConcurrentHashJoinPoolThreadsScheduled,
|
CurrentMetrics::ConcurrentHashJoinPoolThreadsScheduled,
|
||||||
/*max_threads_*/ max_threads,
|
/*max_threads_*/ slots,
|
||||||
/*max_free_threads_*/ max_threads,
|
/*max_free_threads_*/ 0,
|
||||||
/*queue_size_*/ slots))
|
/*queue_size_*/ slots))
|
||||||
, stats_collecting_params(stats_collecting_params_)
|
, stats_collecting_params(stats_collecting_params_)
|
||||||
{
|
{
|
||||||
|
@ -70,7 +70,6 @@ private:
|
|||||||
ContextPtr context;
|
ContextPtr context;
|
||||||
std::shared_ptr<TableJoin> table_join;
|
std::shared_ptr<TableJoin> table_join;
|
||||||
size_t slots;
|
size_t slots;
|
||||||
size_t max_threads;
|
|
||||||
std::unique_ptr<ThreadPool> pool;
|
std::unique_ptr<ThreadPool> pool;
|
||||||
std::vector<std::shared_ptr<InternalHashJoin>> hash_joins;
|
std::vector<std::shared_ptr<InternalHashJoin>> hash_joins;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user