summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/repltests.cpp
diff options
context:
space:
mode:
authorEvgeni Dobranov <evgeni.dobranov@mongodb.com>2019-09-30 20:02:19 +0000
committerevergreen <evergreen@mongodb.com>2019-09-30 20:02:19 +0000
commit344e1b0f3ce5caf0d4760dddc8b2d196d4b73fe8 (patch)
tree14567c05e50661f6fb3b983a2b19a26abfe4a22c /src/mongo/dbtests/repltests.cpp
parent25b63d9ff12ebdfde549288ebaa7ff27c6945dd7 (diff)
downloadmongo-344e1b0f3ce5caf0d4760dddc8b2d196d4b73fe8.tar.gz
SERVER-41496 Remove Database::getCollection() and replace with CollectionCatalog::get().lookupCollectionByNamespace()
Diffstat (limited to 'src/mongo/dbtests/repltests.cpp')
-rw-r--r--src/mongo/dbtests/repltests.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/dbtests/repltests.cpp b/src/mongo/dbtests/repltests.cpp
index 7ca7eb19d80..638e339766a 100644
--- a/src/mongo/dbtests/repltests.cpp
+++ b/src/mongo/dbtests/repltests.cpp
@@ -138,7 +138,7 @@ public:
dbtests::WriteContextForTests ctx(&_opCtx, ns());
WriteUnitOfWork wuow(&_opCtx);
- Collection* c = ctx.db()->getCollection(&_opCtx, nss());
+ Collection* c = CollectionCatalog::get(&_opCtx).lookupCollectionByNamespace(nss());
if (!c) {
c = ctx.db()->createCollection(&_opCtx, nss());
}
@@ -208,7 +208,7 @@ protected:
Lock::GlobalWrite lk(&_opCtx);
OldClientContext ctx(&_opCtx, ns());
Database* db = ctx.db();
- Collection* coll = db->getCollection(&_opCtx, nss());
+ Collection* coll = CollectionCatalog::get(&_opCtx).lookupCollectionByNamespace(nss());
if (!coll) {
WriteUnitOfWork wunit(&_opCtx);
coll = db->createCollection(&_opCtx, nss());
@@ -265,7 +265,7 @@ protected:
NamespaceString nss(ns);
Database* db = ctx.db();
- Collection* coll = db->getCollection(&_opCtx, nss);
+ Collection* coll = CollectionCatalog::get(&_opCtx).lookupCollectionByNamespace(nss);
if (!coll) {
WriteUnitOfWork wunit(&_opCtx);
coll = db->createCollection(&_opCtx, nss);
@@ -286,7 +286,7 @@ protected:
OldClientContext ctx(&_opCtx, ns);
WriteUnitOfWork wunit(&_opCtx);
Database* db = ctx.db();
- Collection* coll = db->getCollection(&_opCtx, nss);
+ Collection* coll = CollectionCatalog::get(&_opCtx).lookupCollectionByNamespace(nss);
if (!coll) {
coll = db->createCollection(&_opCtx, nss);
}
@@ -300,7 +300,7 @@ protected:
OldClientContext ctx(&_opCtx, ns());
WriteUnitOfWork wunit(&_opCtx);
Database* db = ctx.db();
- Collection* coll = db->getCollection(&_opCtx, nss());
+ Collection* coll = CollectionCatalog::get(&_opCtx).lookupCollectionByNamespace(nss());
if (!coll) {
coll = db->createCollection(&_opCtx, nss());
}