Minor fix

This commit is contained in:
Igor Nikonov 2024-02-07 01:30:48 +00:00
parent 755298838f
commit 4f153b59c0

View File

@ -416,7 +416,10 @@ void ReadFromParallelRemoteReplicasStep::initializePipeline(QueryPipelineBuilder
std::vector<ConnectionPoolWithFailover::Base::ShuffledPool> shuffled_pool;
if (all_replicas_count < shard.getAllNodeCount())
{
shuffled_pool = shard.pool->getShuffledPools(current_settings);
shuffled_pool.resize(all_replicas_count);
}
else
{
/// try to preserve replicas order if all replicas in cluster are used for query execution
@ -424,7 +427,6 @@ void ReadFromParallelRemoteReplicasStep::initializePipeline(QueryPipelineBuilder
auto priority_func = [](size_t i) { return Priority{static_cast<Int64>(i)}; };
shuffled_pool = shard.pool->getShuffledPools(current_settings, priority_func);
}
shuffled_pool.resize(all_replicas_count);
for (size_t i=0; i < all_replicas_count; ++i)
{