diff options
author | Geert Bosch <geert@mongodb.com> | 2019-04-16 17:33:20 -0400 |
---|---|---|
committer | Geert Bosch <geert@mongodb.com> | 2019-04-17 15:40:11 -0400 |
commit | e0cafae280e508ef887bd08978dcbc5630c08a34 (patch) | |
tree | 225fea823d49fcbe836a0f64d3afdfd7573ebfc5 /src/mongo/db/introspect.cpp | |
parent | bf774fb0a5e9bed81bc475585deb70812a2c9c41 (diff) | |
download | mongo-e0cafae280e508ef887bd08978dcbc5630c08a34.tar.gz |
SERVER-40688 Make CollectionLock take NamespaceString
Diffstat (limited to 'src/mongo/db/introspect.cpp')
-rw-r--r-- | src/mongo/db/introspect.cpp | 5 |
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(); |