diff options
author | Jordi Olivares Provencio <jordi.olivares-provencio@mongodb.com> | 2022-04-26 08:54:30 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-04-26 09:50:50 +0000 |
commit | c9d4924f3b0628166bac7a464f78f3addefacd3b (patch) | |
tree | 88a540820599a55e4b6797d53dbecd68146bf5e1 /src/mongo/db/catalog | |
parent | f842e0f0595acc9aee90baf9d4695970ca4bccd9 (diff) | |
download | mongo-c9d4924f3b0628166bac7a464f78f3addefacd3b.tar.gz |
SERVER-65426 Verify if there's an existing view when creating a collection
Diffstat (limited to 'src/mongo/db/catalog')
-rw-r--r-- | src/mongo/db/catalog/collection_catalog.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/catalog/collection_catalog.cpp b/src/mongo/db/catalog/collection_catalog.cpp index aaaf68d6bd3..34665a8f893 100644 --- a/src/mongo/db/catalog/collection_catalog.cpp +++ b/src/mongo/db/catalog/collection_catalog.cpp @@ -1271,7 +1271,9 @@ void CollectionCatalog::_ensureNamespaceDoesNotExist(OperationContext* opCtx, 5725003, "Conflicted registering namespace, already have a view with the same namespace", "nss"_attr = nss); - throw WriteConflictException(); + uasserted(ErrorCodes::NamespaceExists, + "Conflicted registering namespace, already have a view with the same " + "namespace"); } } } |