From b419f838d37062bd218cf676e13a8f9a122dcd01 Mon Sep 17 00:00:00 2001 From: Alexey Arno Date: Fri, 16 Jan 2015 13:48:53 +0300 Subject: [PATCH] dbms: Server: queries with several replicas: development [#METR-14410] --- dbms/include/DB/Client/ConnectionPool.h | 4 ++++ dbms/include/DB/DataStreams/RemoteBlockInputStream.h | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dbms/include/DB/Client/ConnectionPool.h b/dbms/include/DB/Client/ConnectionPool.h index 6e0acd1354c..062c83b5a33 100644 --- a/dbms/include/DB/Client/ConnectionPool.h +++ b/dbms/include/DB/Client/ConnectionPool.h @@ -28,6 +28,10 @@ public: typedef PoolBase::Entry Entry; virtual Entry get(Settings * settings = nullptr) = 0; + /** Выделяет до указанного количества соединений для работы. + * Соединения предоставляют доступ к разным репликам одного шарда. + * Выкидывает исключение, если не удалось выделить ни одного соединения. + */ virtual std::vector getMany(Settings * settings = nullptr) { return std::vector{ get(settings) }; diff --git a/dbms/include/DB/DataStreams/RemoteBlockInputStream.h b/dbms/include/DB/DataStreams/RemoteBlockInputStream.h index 326fe56579a..1b7070b2edc 100644 --- a/dbms/include/DB/DataStreams/RemoteBlockInputStream.h +++ b/dbms/include/DB/DataStreams/RemoteBlockInputStream.h @@ -164,8 +164,6 @@ protected: use_many_replicas = false; connection = &*entries[0]; } - else // XXX Придумать исключение + сообщение - throw Exception(""); } else {