diff options
Diffstat (limited to 'src/mongo/executor/connection_pool.h')
| -rw-r--r-- | src/mongo/executor/connection_pool.h | 41 |
1 files changed, 3 insertions, 38 deletions
diff --git a/src/mongo/executor/connection_pool.h b/src/mongo/executor/connection_pool.h index b815003f4d8..0e5bf90dc9a 100644 --- a/src/mongo/executor/connection_pool.h +++ b/src/mongo/executor/connection_pool.h @@ -79,7 +79,6 @@ public: using ConnectionHandleDeleter = std::function<void(ConnectionInterface* connection)>; using ConnectionHandle = std::unique_ptr<ConnectionInterface, ConnectionHandleDeleter>; - using RetrieveConnection = unique_function<SemiFuture<ConnectionHandle>()>; using GetConnectionCallback = unique_function<void(StatusWith<ConnectionHandle>)>; using PoolId = uint64_t; @@ -211,7 +210,6 @@ public: size_t pending = 0; size_t ready = 0; size_t active = 0; - size_t leased = 0; std::string toString() const; }; @@ -254,35 +252,13 @@ public: const std::function<transport::Session::TagMask(transport::Session::TagMask)>& mutateFunc) override; - inline SemiFuture<ConnectionHandle> get(const HostAndPort& hostAndPort, - transport::ConnectSSLMode sslMode, - Milliseconds timeout) { - return _get(hostAndPort, sslMode, timeout, false /*lease*/); - } - + SemiFuture<ConnectionHandle> get(const HostAndPort& hostAndPort, + transport::ConnectSSLMode sslMode, + Milliseconds timeout); void get_forTest(const HostAndPort& hostAndPort, Milliseconds timeout, GetConnectionCallback cb); - /** - * "Lease" a connection from the pool. - * - * Connections retrieved via this method are not assumed to be in active use for the duration of - * their lease and are reported separately in metrics. Otherwise, this method behaves similarly - * to `ConnectionPool::get`. - */ - inline SemiFuture<ConnectionHandle> lease( - const HostAndPort& hostAndPort, - transport::ConnectSSLMode sslMode, - Milliseconds timeout, - ErrorCodes::Error timeoutCode = ErrorCodes::NetworkInterfaceExceededTimeLimit) { - return _get(hostAndPort, sslMode, timeout, true /*lease*/); - } - - void lease_forTest(const HostAndPort& hostAndPort, - Milliseconds timeout, - GetConnectionCallback cb); - void appendConnectionStats(ConnectionPoolStats* stats) const; size_t getNumConnectionsPerHost(const HostAndPort& hostAndPort) const; @@ -292,13 +268,6 @@ public: } private: - SemiFuture<ConnectionHandle> _get(const HostAndPort& hostAndPort, - transport::ConnectSSLMode sslMode, - Milliseconds timeout, - bool leased); - - void retrieve_forTest(RetrieveConnection retrieve, GetConnectionCallback cb); - std::string _name; const std::shared_ptr<DependentTypeFactoryInterface> _factory; @@ -527,10 +496,6 @@ public: return _pool; } - Options getPoolOptions() const { - return _pool->_options; - } - virtual void updateConnectionPoolStats([[maybe_unused]] ConnectionPoolStats* cps) const = 0; protected: |
