Merge branch 'secure_password' of https://github.com/millb/ClickHouse into secure_password

This commit is contained in:
Mikhail Korotov 2020-02-12 13:08:10 +03:00
commit 5bd74b464d
2 changed files with 4 additions and 3 deletions

View File

@ -139,7 +139,8 @@ String Cluster::Address::toFullString() const
{
return
((shard_index == 0) ? "" : "shard" + std::to_string(shard_index)) +
((replica_index == 0) ? "" : "_replica" + std::to_string(replica_index));
((replica_index == 0) ? "" : "_replica" + std::to_string(replica_index)) +
((secure == Protocol::Secure::Enable) ? "+secure" : "");
}
Cluster::Address Cluster::Address::fromFullString(const String & full_string)

View File

@ -190,10 +190,10 @@ ConnectionPoolPtr StorageDistributedDirectoryMonitor::createPool(const std::stri
const auto & shards_info = cluster->getShardsInfo();
const auto & shards_addresses = cluster->getShardsAddresses();
/// check format shard{shard_index}_number{number_index}
/// check new format shard{shard_index}_number{number_index}
if (address.shard_index != 0)
{
return shards_info[address.shard_index].per_replica_pools[address.replica_index];
return shards_info[address.shard_index - 1].per_replica_pools[address.replica_index - 1];
}
/// existing connections pool have a higher priority