diff --git a/dbms/include/DB/Client/ConnectionPool.h b/dbms/include/DB/Client/ConnectionPool.h index aece5616f36..6e0acd1354c 100644 --- a/dbms/include/DB/Client/ConnectionPool.h +++ b/dbms/include/DB/Client/ConnectionPool.h @@ -28,7 +28,7 @@ public: typedef PoolBase::Entry Entry; virtual Entry get(Settings * settings = nullptr) = 0; - virtual std::vector getMany(unsigned max_connections, Settings * settings = nullptr) + virtual std::vector getMany(Settings * settings = nullptr) { return std::vector{ get(settings) }; } diff --git a/dbms/include/DB/Client/ConnectionPoolWithFailover.h b/dbms/include/DB/Client/ConnectionPoolWithFailover.h index d468e10f5a9..04c7ed296f1 100644 --- a/dbms/include/DB/Client/ConnectionPoolWithFailover.h +++ b/dbms/include/DB/Client/ConnectionPoolWithFailover.h @@ -57,11 +57,13 @@ public: return Base::get(settings); } - /** Выделяет до указанного количества соединений. */ - std::vector getMany(unsigned max_connections, Settings * settings = nullptr) override + /** Выделяет до указанного количества соединений для работы. + * Соединения предоставляют доступ к разным репликам одного шарда. + */ + std::vector getMany(Settings * settings = nullptr) override { applyLoadBalancing(settings); - return Base::getMany(max_connections, settings); + return Base::getMany(settings); } protected: