diff options
author | Evgeni Dobranov <evgeni.dobranov@mongodb.com> | 2019-09-30 20:02:19 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-09-30 20:02:19 +0000 |
commit | 344e1b0f3ce5caf0d4760dddc8b2d196d4b73fe8 (patch) | |
tree | 14567c05e50661f6fb3b983a2b19a26abfe4a22c /src/mongo/db/catalog/drop_collection.cpp | |
parent | 25b63d9ff12ebdfde549288ebaa7ff27c6945dd7 (diff) | |
download | mongo-344e1b0f3ce5caf0d4760dddc8b2d196d4b73fe8.tar.gz |
SERVER-41496 Remove Database::getCollection() and replace with CollectionCatalog::get().lookupCollectionByNamespace()
Diffstat (limited to 'src/mongo/db/catalog/drop_collection.cpp')
-rw-r--r-- | src/mongo/db/catalog/drop_collection.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/catalog/drop_collection.cpp b/src/mongo/db/catalog/drop_collection.cpp index 107e9b7ddad..5167f4f8383 100644 --- a/src/mongo/db/catalog/drop_collection.cpp +++ b/src/mongo/db/catalog/drop_collection.cpp @@ -108,7 +108,7 @@ Status _dropCollection(OperationContext* opCtx, DropCollectionSystemCollectionMode systemCollectionMode, BSONObjBuilder& result) { Lock::CollectionLock collLock(opCtx, collectionName, MODE_X); - Collection* coll = db->getCollection(opCtx, collectionName); + Collection* coll = CollectionCatalog::get(opCtx).lookupCollectionByNamespace(collectionName); if (!coll) { return Status(ErrorCodes::NamespaceNotFound, "ns not found"); } @@ -172,7 +172,8 @@ Status dropCollection(OperationContext* opCtx, return Status(ErrorCodes::NamespaceNotFound, "ns not found"); } - Collection* coll = db->getCollection(opCtx, collectionName); + Collection* coll = + CollectionCatalog::get(opCtx).lookupCollectionByNamespace(collectionName); if (!coll) { return _dropView(opCtx, db, collectionName, result); } else { |