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/views | |
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/views')
-rw-r--r-- | src/mongo/db/views/durable_view_catalog.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mongo/db/views/durable_view_catalog.cpp b/src/mongo/db/views/durable_view_catalog.cpp index 3d969308c9a..86afedc12a7 100644 --- a/src/mongo/db/views/durable_view_catalog.cpp +++ b/src/mongo/db/views/durable_view_catalog.cpp @@ -111,7 +111,8 @@ void DurableViewCatalogImpl::_iterate(OperationContext* opCtx, ViewCatalogLookupBehavior lookupBehavior) { invariant(opCtx->lockState()->isCollectionLockedForMode(_db->getSystemViewsName(), MODE_IS)); - Collection* systemViews = _db->getCollection(opCtx, _db->getSystemViewsName()); + Collection* systemViews = + CollectionCatalog::get(opCtx).lookupCollectionByNamespace(_db->getSystemViewsName()); if (!systemViews) { return; } @@ -185,7 +186,8 @@ void DurableViewCatalogImpl::upsert(OperationContext* opCtx, NamespaceString systemViewsNs(_db->getSystemViewsName()); dassert(opCtx->lockState()->isCollectionLockedForMode(systemViewsNs, MODE_X)); - Collection* systemViews = _db->getCollection(opCtx, systemViewsNs); + Collection* systemViews = + CollectionCatalog::get(opCtx).lookupCollectionByNamespace(systemViewsNs); invariant(systemViews); const bool requireIndex = false; @@ -212,7 +214,8 @@ void DurableViewCatalogImpl::remove(OperationContext* opCtx, const NamespaceStri dassert(opCtx->lockState()->isDbLockedForMode(_db->name(), MODE_IX)); dassert(opCtx->lockState()->isCollectionLockedForMode(name, MODE_IX)); - Collection* systemViews = _db->getCollection(opCtx, _db->getSystemViewsName()); + Collection* systemViews = + CollectionCatalog::get(opCtx).lookupCollectionByNamespace(_db->getSystemViewsName()); dassert(opCtx->lockState()->isCollectionLockedForMode(systemViews->ns(), MODE_X)); if (!systemViews) |