mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-23 10:10:50 +00:00
dbms: Server: add improvements and the ability of waiting for a read event on several connections. [#METR-14410]
This commit is contained in:
parent
27d0de84b7
commit
631a1a2717
@ -28,7 +28,7 @@ public:
|
||||
typedef PoolBase<Connection>::Entry Entry;
|
||||
virtual Entry get(Settings * settings = nullptr) = 0;
|
||||
|
||||
virtual std::vector<Entry> getMany(unsigned max_connections, Settings * settings = nullptr)
|
||||
virtual std::vector<Entry> getMany(Settings * settings = nullptr)
|
||||
{
|
||||
return std::vector<Entry>{ get(settings) };
|
||||
}
|
||||
|
@ -57,11 +57,13 @@ public:
|
||||
return Base::get(settings);
|
||||
}
|
||||
|
||||
/** Выделяет до указанного количества соединений. */
|
||||
std::vector<Entry> getMany(unsigned max_connections, Settings * settings = nullptr) override
|
||||
/** Выделяет до указанного количества соединений для работы.
|
||||
* Соединения предоставляют доступ к разным репликам одного шарда.
|
||||
*/
|
||||
std::vector<Entry> getMany(Settings * settings = nullptr) override
|
||||
{
|
||||
applyLoadBalancing(settings);
|
||||
return Base::getMany(max_connections, settings);
|
||||
return Base::getMany(settings);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
Loading…
Reference in New Issue
Block a user