mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 18:12:02 +00:00
Merge
This commit is contained in:
commit
9b15c2e0f1
@ -176,7 +176,6 @@ Cluster::Cluster(const Settings & settings, const String & cluster_name)
|
||||
replicas.reserve(shard.size());
|
||||
|
||||
bool has_local_replica = false;
|
||||
bool has_remote_replica = false;
|
||||
|
||||
for (const auto & replica : shard)
|
||||
{
|
||||
@ -184,10 +183,10 @@ Cluster::Cluster(const Settings & settings, const String & cluster_name)
|
||||
{
|
||||
has_local_replica = true;
|
||||
local_addresses.push_back(replica);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
has_remote_replica = true;
|
||||
replicas.emplace_back(new ConnectionPool(
|
||||
settings.distributed_connections_pool_size,
|
||||
replica.host_name, replica.port, replica.resolved_address,
|
||||
@ -201,7 +200,7 @@ Cluster::Cluster(const Settings & settings, const String & cluster_name)
|
||||
|
||||
if (has_local_replica)
|
||||
++local_nodes_num;
|
||||
if (has_remote_replica)
|
||||
else
|
||||
pools.emplace_back(new ConnectionPoolWithFailover(replicas, settings.load_balancing, settings.connections_with_failover_max_tries));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user