summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/validate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/commands/validate.cpp')
-rw-r--r--src/mongo/db/commands/validate.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/commands/validate.cpp b/src/mongo/db/commands/validate.cpp
index f90a3ace4fe..482baff8b74 100644
--- a/src/mongo/db/commands/validate.cpp
+++ b/src/mongo/db/commands/validate.cpp
@@ -50,7 +50,7 @@ MONGO_FAIL_POINT_DEFINE(validateCmdCollectionNotValid);
namespace {
// Protects the state below.
-stdx::mutex _validationMutex;
+Mutex _validationMutex;
// Holds the set of full `databaseName.collectionName` namespace strings in progress. Validation
// commands register themselves in this data structure so that subsequent commands on the same
@@ -140,7 +140,7 @@ public:
// Only one validation per collection can be in progress, the rest wait.
{
- stdx::unique_lock<stdx::mutex> lock(_validationMutex);
+ stdx::unique_lock<Latch> lock(_validationMutex);
try {
while (_validationsInProgress.find(nss.ns()) != _validationsInProgress.end()) {
opCtx->waitForConditionOrInterrupt(_validationNotifier, lock);
@@ -157,7 +157,7 @@ public:
}
ON_BLOCK_EXIT([&] {
- stdx::lock_guard<stdx::mutex> lock(_validationMutex);
+ stdx::lock_guard<Latch> lock(_validationMutex);
_validationsInProgress.erase(nss.ns());
_validationNotifier.notify_all();
});