summaryrefslogtreecommitdiff
path: root/src/mongo/executor/network_interface_tl.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/network_interface_tl.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/network_interface_tl.h')
-rw-r--r--src/mongo/executor/network_interface_tl.h36
1 files changed, 2 insertions, 34 deletions
diff --git a/src/mongo/executor/network_interface_tl.h b/src/mongo/executor/network_interface_tl.h
index 68c51d57aa7..158e4b0a679 100644
--- a/src/mongo/executor/network_interface_tl.h
+++ b/src/mongo/executor/network_interface_tl.h
@@ -31,12 +31,9 @@
#include <deque>
-#include <boost/optional.hpp>
-
#include "mongo/client/async_client.h"
#include "mongo/db/service_context.h"
#include "mongo/executor/connection_pool.h"
-#include "mongo/executor/connection_pool_tl.h"
#include "mongo/executor/network_interface.h"
#include "mongo/logv2/log_severity.h"
#include "mongo/platform/mutex.h"
@@ -106,33 +103,6 @@ public:
Milliseconds timeout,
Status status) override;
- /**
- * NetworkInterfaceTL's implementation of a leased network-stream
- * provided for manual use outside of the NITL's usual RPC API.
- * When this type is destroyed, the destructor of the ConnectionHandle
- * member will return the connection to this NetworkInterface's ConnectionPool.
- */
- class LeasedStream : public NetworkInterface::LeasedStream {
- public:
- AsyncDBClient* getClient() override;
-
- LeasedStream(ConnectionPool::ConnectionHandle&& conn) : _conn{std::move(conn)} {}
-
- // These pass-through indications of the health of the leased
- // stream to the underlying ConnectionHandle
- void indicateSuccess() override;
- void indicateUsed() override;
- void indicateFailure(Status) override;
-
- private:
- ConnectionPool::ConnectionHandle _conn;
- };
-
- SemiFuture<std::unique_ptr<NetworkInterface::LeasedStream>> leaseStream(
- const HostAndPort& hostAndPort,
- transport::ConnectSSLMode sslMode,
- Milliseconds timeout) override;
-
private:
struct RequestState;
struct RequestManager;
@@ -372,10 +342,8 @@ private:
std::unique_ptr<transport::TransportLayer> _ownedTransportLayer;
transport::ReactorHandle _reactor;
- // TODO SERVER-75830: This Mutex used to be at hierarcichal acquisition level 3. We temporary
- // removed the level because it is sometimes acquired as part of task-scheduling when
- // lower-level mutexes (like the ConnectionPool's) are held.
- mutable Mutex _mutex = MONGO_MAKE_LATCH("NetworkInterfaceTL::_mutex");
+ mutable Mutex _mutex =
+ MONGO_MAKE_LATCH(HierarchicalAcquisitionLevel(3), "NetworkInterfaceTL::_mutex");
const ConnectionPool::Options _connPoolOpts;
std::unique_ptr<NetworkConnectionHook> _onConnectHook;
std::shared_ptr<ConnectionPool> _pool;