summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mongo/db/catalog/collection.cpp6
-rw-r--r--src/mongo/db/concurrency/d_concurrency.cpp2
-rw-r--r--src/mongo/logger/console.cpp2
3 files changed, 6 insertions, 4 deletions
diff --git a/src/mongo/db/catalog/collection.cpp b/src/mongo/db/catalog/collection.cpp
index b96a578c0aa..1cb7361590f 100644
--- a/src/mongo/db/catalog/collection.cpp
+++ b/src/mongo/db/catalog/collection.cpp
@@ -508,7 +508,8 @@ Status Collection::_insertDocuments(OperationContext* txn,
// X-lock the metadata resource for this capped collection until the end of the WUOW. This
// prevents the primary from executing with more concurrency than secondaries.
// See SERVER-21646.
- Lock::ResourceLock{txn->lockState(), ResourceId(RESOURCE_METADATA, _ns.ns()), MODE_X};
+ Lock::ResourceLock heldUntilEndOfWUOW{
+ txn->lockState(), ResourceId(RESOURCE_METADATA, _ns.ns()), MODE_X};
}
std::vector<Record> records;
@@ -632,7 +633,8 @@ StatusWith<RecordId> Collection::updateDocument(OperationContext* txn,
// X-lock the metadata resource for this capped collection until the end of the WUOW. This
// prevents the primary from executing with more concurrency than secondaries.
// See SERVER-21646.
- Lock::ResourceLock{txn->lockState(), ResourceId(RESOURCE_METADATA, _ns.ns()), MODE_X};
+ Lock::ResourceLock heldUntilEndOfWUOW{
+ txn->lockState(), ResourceId(RESOURCE_METADATA, _ns.ns()), MODE_X};
}
SnapshotId sid = txn->recoveryUnit()->getSnapshotId();
diff --git a/src/mongo/db/concurrency/d_concurrency.cpp b/src/mongo/db/concurrency/d_concurrency.cpp
index 2b90ca4f376..a2aead7cdb4 100644
--- a/src/mongo/db/concurrency/d_concurrency.cpp
+++ b/src/mongo/db/concurrency/d_concurrency.cpp
@@ -286,7 +286,7 @@ void synchronizeOnCappedInFlightResource(Locker* lockState, const NamespaceStrin
lockState->isLockHeldForMode(resourceCappedInFlightForOtherDb, MODE_IX));
}
- Lock::ResourceLock{lockState, resource, MODE_IX}; // held until end of WUOW.
+ Lock::ResourceLock heldUntilEndOfWUOW{lockState, resource, MODE_IX};
}
} // namespace mongo
diff --git a/src/mongo/logger/console.cpp b/src/mongo/logger/console.cpp
index ea8bd299e1d..93c98c052a9 100644
--- a/src/mongo/logger/console.cpp
+++ b/src/mongo/logger/console.cpp
@@ -236,7 +236,7 @@ std::ostream* windowsOutputStream = getWindowsOutputStream();
// first logging call writing via the Console will happen elsewhere in
// the initalizer chain.
MONGO_INITIALIZER(EnsureIosBaseInitConstructed)(InitializerContext*) {
- Console();
+ Console forInitializationOnly;
return Status::OK();
}