mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
fix darwin build
This commit is contained in:
parent
806df20d18
commit
7bbbe0a4db
@ -1160,14 +1160,14 @@ int Server::main(const std::vector<std::string> & /*args*/)
|
||||
if (config->has("concurrent_threads_soft_limit_num"))
|
||||
{
|
||||
auto value = config->getUInt64("concurrent_threads_soft_limit_num", 0);
|
||||
if (value > 0)
|
||||
concurrent_threads_soft_limit = std::min(concurrent_threads_soft_limit, value);
|
||||
if (value > 0 && value < concurrent_threads_soft_limit)
|
||||
concurrent_threads_soft_limit = value;
|
||||
}
|
||||
if (config->has("concurrent_threads_soft_limit_ratio_to_cores"))
|
||||
{
|
||||
auto value = config->getUInt64("concurrent_threads_soft_limit_ratio_to_cores", 0) * std::thread::hardware_concurrency();
|
||||
if (value > 0)
|
||||
concurrent_threads_soft_limit = std::min(concurrent_threads_soft_limit, value);
|
||||
if (value > 0 && value < concurrent_threads_soft_limit)
|
||||
concurrent_threads_soft_limit = value;
|
||||
}
|
||||
ConcurrencyControl::instance().setMaxConcurrency(concurrent_threads_soft_limit);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user