diff options
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) |