summaryrefslogtreecommitdiff
path: root/src/mongo/executor/network_interface_tl.h
diff options
context:
space:
mode:
authorRahul Sundararaman <rahul.sundararaman@mongodb.com>2019-12-09 18:32:45 +0000
committerevergreen <evergreen@mongodb.com>2019-12-09 18:32:45 +0000
commit4f00d6e3d7e54a2d131b8216d4b4ef9bfd7a7c6b (patch)
tree97b83f3c954bd475f8eb5d94f592eca57a5018f7 /src/mongo/executor/network_interface_tl.h
parent1f32f6c3952581833482a1c3b0b7ab913b60943f (diff)
downloadmongo-4f00d6e3d7e54a2d131b8216d4b4ef9bfd7a7c6b.tar.gz
SERVER-44155 Validate a subset of latches of all levels
Diffstat (limited to 'src/mongo/executor/network_interface_tl.h')
-rw-r--r--src/mongo/executor/network_interface_tl.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/executor/network_interface_tl.h b/src/mongo/executor/network_interface_tl.h
index ee27fdd410f..80e510a015f 100644
--- a/src/mongo/executor/network_interface_tl.h
+++ b/src/mongo/executor/network_interface_tl.h
@@ -40,6 +40,7 @@
#include "mongo/stdx/unordered_map.h"
#include "mongo/transport/baton.h"
#include "mongo/transport/transport_layer.h"
+#include "mongo/util/hierarchical_acquisition.h"
#include "mongo/util/strong_weak_finish_line.h"
namespace mongo {
@@ -147,7 +148,8 @@ private:
std::unique_ptr<transport::TransportLayer> _ownedTransportLayer;
transport::ReactorHandle _reactor;
- mutable Mutex _mutex = MONGO_MAKE_LATCH("NetworkInterfaceTL::_mutex");
+ mutable Mutex _mutex =
+ MONGO_MAKE_LATCH(HierarchicalAcquisitionLevel(3), "NetworkInterfaceTL::_mutex");
ConnectionPool::Options _connPoolOpts;
std::unique_ptr<NetworkConnectionHook> _onConnectHook;
std::shared_ptr<ConnectionPool> _pool;
@@ -165,7 +167,8 @@ private:
AtomicWord<State> _state;
stdx::thread _ioThread;
- Mutex _inProgressMutex = MONGO_MAKE_LATCH("NetworkInterfaceTL::_inProgressMutex");
+ Mutex _inProgressMutex =
+ MONGO_MAKE_LATCH(HierarchicalAcquisitionLevel(0), "NetworkInterfaceTL::_inProgressMutex");
stdx::unordered_map<TaskExecutor::CallbackHandle, std::weak_ptr<CommandState>> _inProgress;
stdx::unordered_map<TaskExecutor::CallbackHandle, std::shared_ptr<AlarmState>>
_inProgressAlarms;