mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
dbms: Server: add support for multiple connections in PoolWithFailoverBase. [#METR-14410]
This commit is contained in:
parent
3bf24e5e28
commit
79ea4bf08f
@ -28,7 +28,7 @@ public:
|
||||
typedef PoolBase<Connection>::Entry Entry;
|
||||
virtual Entry get(Settings * settings = nullptr) = 0;
|
||||
|
||||
virtual std::vector<Entry> getMany(Settings * settings = nullptr)
|
||||
virtual std::vector<Entry> getMany(unsigned max_connections, Settings * settings = nullptr)
|
||||
{
|
||||
return std::vector<Entry>{ get(settings) };
|
||||
}
|
||||
|
@ -57,13 +57,11 @@ public:
|
||||
return Base::get(settings);
|
||||
}
|
||||
|
||||
/** Выделяет до указанного количества соединений для работы.
|
||||
* Соединения предоставляют доступ к разным репликам одного шарда.
|
||||
*/
|
||||
std::vector<Entry> getMany(Settings * settings = nullptr) override
|
||||
/** Выделяет до указанного количества соединений. */
|
||||
std::vector<Entry> getMany(unsigned max_connections, Settings * settings = nullptr) override
|
||||
{
|
||||
applyLoadBalancing(settings);
|
||||
return Base::getMany(settings);
|
||||
return Base::getMany(max_connections, settings);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
Loading…
Reference in New Issue
Block a user