mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-04 21:42:39 +00:00
Fix
This commit is contained in:
parent
c494096d33
commit
9f20e33d50
@ -456,9 +456,9 @@ void ReadFromParallelRemoteReplicasStep::initializePipeline(QueryPipelineBuilder
|
|||||||
|
|
||||||
std::vector<ConnectionPoolPtr> pools_to_use;
|
std::vector<ConnectionPoolPtr> pools_to_use;
|
||||||
pools_to_use.reserve(shuffled_pool.size());
|
pools_to_use.reserve(shuffled_pool.size());
|
||||||
if (exclude_local_replica)
|
for (const auto & pool : shuffled_pool)
|
||||||
{
|
{
|
||||||
for (auto & pool : shuffled_pool)
|
if (exclude_local_replica)
|
||||||
{
|
{
|
||||||
const auto & hostname = pool.pool->getHost();
|
const auto & hostname = pool.pool->getHost();
|
||||||
auto it = std::find_if(
|
auto it = std::find_if(
|
||||||
@ -466,9 +466,11 @@ void ReadFromParallelRemoteReplicasStep::initializePipeline(QueryPipelineBuilder
|
|||||||
end(shard.local_addresses),
|
end(shard.local_addresses),
|
||||||
[&hostname](const Cluster::Address & local_addr) { return hostname == local_addr.host_name; });
|
[&hostname](const Cluster::Address & local_addr) { return hostname == local_addr.host_name; });
|
||||||
if (it == shard.local_addresses.end())
|
if (it == shard.local_addresses.end())
|
||||||
{
|
|
||||||
pools_to_use.push_back(pool.pool);
|
pools_to_use.push_back(pool.pool);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pools_to_use.push_back(pool.pool);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user