diff --git a/src/Processors/QueryPlan/ReadFromRemote.cpp b/src/Processors/QueryPlan/ReadFromRemote.cpp index 4a40d4343fd..5bc082b06ee 100644 --- a/src/Processors/QueryPlan/ReadFromRemote.cpp +++ b/src/Processors/QueryPlan/ReadFromRemote.cpp @@ -240,7 +240,8 @@ void ReadFromRemote::addPipe(Pipes & pipes, const ClusterProxy::SelectStreamFact shard.shard_info.pool, query_string, output_stream->header, context, throttler, scalars, external_tables, stage); remote_query_executor->setLogger(log); - remote_query_executor->setPoolMode(PoolMode::GET_ONE); + if (context->getParallelReplicasMode() == Context::ParallelReplicasMode::READ_TASKS) + remote_query_executor->setPoolMode(PoolMode::GET_ONE); if (!table_func_ptr) remote_query_executor->setMainTable(shard.main_table ? shard.main_table : main_table);