summaryrefslogtreecommitdiff
path: root/src/mongo/executor/connection_pool.h
diff options
context:
space:
mode:
authorLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-11 15:07:35 -0300
committerLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-11 15:07:35 -0300
commit4cb8841196d0625dfa3825aa326f071cd27c7b8b (patch)
tree1682a647d4463397c119183369ae6f750d5fdcff /src/mongo/executor/connection_pool.h
parentaa03c6362cbaa767638e6eed9b031d86dd2643d1 (diff)
parent8f0827553e09872941945a093b647a4211a9db7f (diff)
Update upstream source from tag 'upstream/6.0.0'master
Update to upstream version '6.0.0' with Debian dir 5604a80ec1c96ca76f25f40d78e6ef855abec322
Diffstat (limited to 'src/mongo/executor/connection_pool.h')
-rw-r--r--src/mongo/executor/connection_pool.h41
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: