diff options
author | Henrik Edin <henrik.edin@mongodb.com> | 2023-02-15 14:12:23 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-02-15 15:41:49 +0000 |
commit | c3a54fa12ceb2e4e7b5fad5bd117bbab9b9c486f (patch) | |
tree | 26e1b286c300deb75b72e1747900c39347415aca /src/mongo/db/mongod_main.cpp | |
parent | 8f36c90d997708507e1d73c4200d79a92619f422 (diff) | |
download | mongo-c3a54fa12ceb2e4e7b5fad5bd117bbab9b9c486f.tar.gz |
SERVER-73818 Remove CollectionPtr from CollectionCatalog interface
Interfaces instead return 'const Collection*' and if a CollectionPtr is needed it must be created by the user.
Diffstat (limited to 'src/mongo/db/mongod_main.cpp')
-rw-r--r-- | src/mongo/db/mongod_main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/mongod_main.cpp b/src/mongo/db/mongod_main.cpp index 31aa1d7079b..c2060a15738 100644 --- a/src/mongo/db/mongod_main.cpp +++ b/src/mongo/db/mongod_main.cpp @@ -288,7 +288,7 @@ void logStartup(OperationContext* opCtx) { Lock::GlobalWrite lk(opCtx); AutoGetDb autoDb(opCtx, startupLogCollectionName.dbName(), mongo::MODE_X); auto db = autoDb.ensureDbExists(opCtx); - CollectionPtr collection = + auto collection = CollectionCatalog::get(opCtx)->lookupCollectionByNamespace(opCtx, startupLogCollectionName); WriteUnitOfWork wunit(opCtx); if (!collection) { @@ -303,7 +303,7 @@ void logStartup(OperationContext* opCtx) { invariant(collection); uassertStatusOK(collection_internal::insertDocument( - opCtx, collection, InsertStatement(o), nullptr /* OpDebug */, false)); + opCtx, CollectionPtr(collection), InsertStatement(o), nullptr /* OpDebug */, false)); wunit.commit(); } |