diff options
Diffstat (limited to 'src/mongo/db/catalog/collection_catalog_helper.cpp')
-rw-r--r-- | src/mongo/db/catalog/collection_catalog_helper.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/catalog/collection_catalog_helper.cpp b/src/mongo/db/catalog/collection_catalog_helper.cpp index 6c7dd9e19bc..c094444b9e3 100644 --- a/src/mongo/db/catalog/collection_catalog_helper.cpp +++ b/src/mongo/db/catalog/collection_catalog_helper.cpp @@ -31,7 +31,6 @@ #include "mongo/db/catalog/collection.h" #include "mongo/db/catalog/collection_catalog.h" #include "mongo/db/concurrency/d_concurrency.h" -#include "mongo/db/views/view_catalog.h" namespace mongo { @@ -40,12 +39,13 @@ MONGO_FAIL_POINT_DEFINE(hangBeforeGettingNextCollection); namespace catalog { Status checkIfNamespaceExists(OperationContext* opCtx, const NamespaceString& nss) { - if (CollectionCatalog::get(opCtx)->lookupCollectionByNamespace(opCtx, nss)) { + auto catalog = CollectionCatalog::get(opCtx); + if (catalog->lookupCollectionByNamespace(opCtx, nss)) { return Status(ErrorCodes::NamespaceExists, str::stream() << "Collection " << nss.ns() << " already exists."); } - auto view = ViewCatalog::get(opCtx)->lookup(opCtx, nss); + auto view = catalog->lookupView(opCtx, nss); if (!view) return Status::OK(); |