diff options
author | jannaerin <golden.janna@gmail.com> | 2023-03-29 16:29:36 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-03-29 19:13:28 +0000 |
commit | 4326f194dcd67e1053e7e57dae003831aacc5f2c (patch) | |
tree | b8926e345b61498d7628cd340cc224cc610bc11b /src/mongo/db/introspect.cpp | |
parent | 6759d92c8cd619d00bd522bb5ebd688a4d685fd0 (diff) | |
download | mongo-4326f194dcd67e1053e7e57dae003831aacc5f2c.tar.gz |
SERVER-73112 Make NamespaceString constructors private
Diffstat (limited to 'src/mongo/db/introspect.cpp')
-rw-r--r-- | src/mongo/db/introspect.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mongo/db/introspect.cpp b/src/mongo/db/introspect.cpp index 3d236fe7524..6e9cf7bfbfe 100644 --- a/src/mongo/db/introspect.cpp +++ b/src/mongo/db/introspect.cpp @@ -112,8 +112,7 @@ void profile(OperationContext* opCtx, NetworkOp op) { opCtx->getClient()->swapLockState(std::move(oldCtxLocker)); }); AlternativeClientRegion acr(newClient); - const auto dbProfilingNS = - NamespaceString(ns.dbName(), NamespaceString::kSystemDotProfileCollectionName); + const auto dbProfilingNS = NamespaceString::makeSystemDotProfileNamespace(ns.dbName()); AutoGetCollection autoColl(newCtx.get(), dbProfilingNS, MODE_IX); Database* const db = autoColl.getDb(); if (!db) { @@ -149,8 +148,7 @@ void profile(OperationContext* opCtx, NetworkOp op) { Status createProfileCollection(OperationContext* opCtx, Database* db) { invariant(opCtx->lockState()->isDbLockedForMode(db->name(), MODE_IX)); - const auto dbProfilingNS = - NamespaceString(db->name(), NamespaceString::kSystemDotProfileCollectionName); + const auto dbProfilingNS = NamespaceString::makeSystemDotProfileNamespace(db->name()); // Checking the collection exists must also be done in the WCE retry loop. Only retrying // collection creation would endlessly throw errors because the collection exists: must check |