From 866917ad3249454ea2ea44d7a250a4e007a26c90 Mon Sep 17 00:00:00 2001 From: alexey-milovidov Date: Wed, 21 Nov 2018 07:02:19 +0300 Subject: [PATCH] Update Cluster.cpp --- dbms/src/Interpreters/Cluster.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dbms/src/Interpreters/Cluster.cpp b/dbms/src/Interpreters/Cluster.cpp index f39e2d2fddb..e76ec26f385 100644 --- a/dbms/src/Interpreters/Cluster.cpp +++ b/dbms/src/Interpreters/Cluster.cpp @@ -400,15 +400,16 @@ std::unique_ptr Cluster::getClusterWithSingleShard(size_t index) const return std::unique_ptr{ new Cluster(*this, {index}) }; } -std::unique_ptr Cluster::getClusterWithMultipleShards(std::vector indexes) const +std::unique_ptr Cluster::getClusterWithMultipleShards(std::vector indices) const { - return std::unique_ptr{ new Cluster(*this, indexes) }; + return std::unique_ptr{ new Cluster(*this, indices) }; } -Cluster::Cluster(const Cluster & from, std::vector indexes) +Cluster::Cluster(const Cluster & from, std::vector indices) : shards_info{} { - for (size_t index : indexes) { + for (size_t index : indices) + { shards_info.push_back(from.shards_info[index]); if (!from.addresses_with_failover.empty())