summaryrefslogtreecommitdiff
path: root/src/mongo/s/grid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/grid.cpp')
-rw-r--r--src/mongo/s/grid.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/s/grid.cpp b/src/mongo/s/grid.cpp
index 97e2ccef518..bda2bc6e929 100644
--- a/src/mongo/s/grid.cpp
+++ b/src/mongo/s/grid.cpp
@@ -96,12 +96,12 @@ void Grid::setShardingInitialized() {
}
Grid::CustomConnectionPoolStatsFn Grid::getCustomConnectionPoolStatsFn() const {
- stdx::lock_guard<stdx::mutex> lk(_mutex);
+ stdx::lock_guard<Latch> lk(_mutex);
return _customConnectionPoolStatsFn;
}
void Grid::setCustomConnectionPoolStatsFn(CustomConnectionPoolStatsFn statsFn) {
- stdx::lock_guard<stdx::mutex> lk(_mutex);
+ stdx::lock_guard<Latch> lk(_mutex);
invariant(!_customConnectionPoolStatsFn || !statsFn);
_customConnectionPoolStatsFn = std::move(statsFn);
}
@@ -117,7 +117,7 @@ void Grid::setAllowLocalHost(bool allow) {
repl::OpTime Grid::configOpTime() const {
invariant(serverGlobalParams.clusterRole != ClusterRole::ConfigServer);
- stdx::lock_guard<stdx::mutex> lk(_mutex);
+ stdx::lock_guard<Latch> lk(_mutex);
return _configOpTime;
}
@@ -141,7 +141,7 @@ boost::optional<repl::OpTime> Grid::advanceConfigOpTime(OperationContext* opCtx,
boost::optional<repl::OpTime> Grid::_advanceConfigOpTime(const repl::OpTime& opTime) {
invariant(serverGlobalParams.clusterRole != ClusterRole::ConfigServer);
- stdx::lock_guard<stdx::mutex> lk(_mutex);
+ stdx::lock_guard<Latch> lk(_mutex);
if (_configOpTime < opTime) {
repl::OpTime prev = _configOpTime;
_configOpTime = opTime;