summaryrefslogtreecommitdiff
path: root/src/mongo/db/introspect.cpp
diff options
context:
space:
mode:
authorGeert Bosch <geert@mongodb.com>2019-04-16 17:33:20 -0400
committerGeert Bosch <geert@mongodb.com>2019-04-17 15:40:11 -0400
commite0cafae280e508ef887bd08978dcbc5630c08a34 (patch)
tree225fea823d49fcbe836a0f64d3afdfd7573ebfc5 /src/mongo/db/introspect.cpp
parentbf774fb0a5e9bed81bc475585deb70812a2c9c41 (diff)
downloadmongo-e0cafae280e508ef887bd08978dcbc5630c08a34.tar.gz
SERVER-40688 Make CollectionLock take NamespaceString
Diffstat (limited to 'src/mongo/db/introspect.cpp')
-rw-r--r--src/mongo/db/introspect.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mongo/db/introspect.cpp b/src/mongo/db/introspect.cpp
index 02823701286..606bec261d7 100644
--- a/src/mongo/db/introspect.cpp
+++ b/src/mongo/db/introspect.cpp
@@ -193,8 +193,7 @@ void profile(OperationContext* opCtx, NetworkOp op) {
Status createProfileCollection(OperationContext* opCtx, Database* db) {
invariant(opCtx->lockState()->isDbLockedForMode(db->name(), MODE_X));
- const std::string dbProfilingNS(db->getProfilingNS());
-
+ auto& dbProfilingNS = db->getProfilingNS();
Collection* const collection = db->getCollection(opCtx, dbProfilingNS);
if (collection) {
if (!collection->isCapped()) {
@@ -214,7 +213,7 @@ Status createProfileCollection(OperationContext* opCtx, Database* db) {
WriteUnitOfWork wunit(opCtx);
repl::UnreplicatedWritesBlock uwb(opCtx);
- invariant(db->createCollection(opCtx, dbProfilingNS, collectionOptions));
+ invariant(db->createCollection(opCtx, dbProfilingNS.ns(), collectionOptions));
wunit.commit();
return Status::OK();