Remove unused method

This commit is contained in:
Alexey Milovidov 2020-06-19 17:21:26 +03:00
parent 5211a42c04
commit 468eaa8d93
2 changed files with 0 additions and 22 deletions

View File

@ -4369,25 +4369,6 @@ void StorageReplicatedMergeTree::getStatus(Status & res, bool with_zk_fields)
}
std::optional<Cluster::Address> StorageReplicatedMergeTree::findClusterAddress(const ReplicatedMergeTreeAddress & leader_address) const
{
for (auto & iter : global_context.getClusters().getContainer())
{
const auto & shards = iter.second->getShardsAddresses();
for (const auto & shard : shards)
{
for (const auto & replica : shard)
{
/// user is actually specified, not default
if (replica.host_name == leader_address.host && replica.port == leader_address.queries_port && replica.user_specified)
return replica;
}
}
}
return {};
}
void StorageReplicatedMergeTree::getQueue(LogEntriesData & res, String & replica_name_)
{
replica_name_ = replica_name;

View File

@ -519,9 +519,6 @@ private:
bool dropPartsInPartition(zkutil::ZooKeeper & zookeeper, String & partition_id,
StorageReplicatedMergeTree::LogEntry & entry, bool detach);
/// Find cluster address for host
std::optional<Cluster::Address> findClusterAddress(const ReplicatedMergeTreeAddress & leader_address) const;
// Partition helpers
void dropPartition(const ASTPtr & query, const ASTPtr & partition, bool detach, const Context & query_context);
void attachPartition(const ASTPtr & partition, bool part, const Context & query_context);