Update num threads in processors.

This commit is contained in:
Nikolai Kochetov 2020-01-01 13:42:46 +03:00
parent 04193460aa
commit 65a00150b2
2 changed files with 3 additions and 1 deletions

View File

@ -546,7 +546,7 @@ void TCPHandler::processOrdinaryQueryWithProcessors(size_t num_threads)
auto & pipeline = state.io.pipeline;
if (pipeline.getMaxThreads())
num_threads = pipeline.getMaxThreads();
num_threads = std::min(num_threads, pipeline.getMaxThreads());
/// Send header-block, to allow client to prepare output format for data to send.
{

View File

@ -496,6 +496,8 @@ void QueryPipeline::unitePipelines(
table_locks.insert(table_locks.end(), std::make_move_iterator(pipeline.table_locks.begin()), std::make_move_iterator(pipeline.table_locks.end()));
interpreter_context.insert(interpreter_context.end(), pipeline.interpreter_context.begin(), pipeline.interpreter_context.end());
storage_holder.insert(storage_holder.end(), pipeline.storage_holder.begin(), pipeline.storage_holder.end());
max_threads = std::max(max_threads, pipeline.max_threads);
}
if (!extremes.empty())