summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico <enrico.golfieri@mongodb.com>2023-08-17 12:30:43 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-08-17 13:04:21 +0000
commit06d394ce79586866024ee5012366deef32e23bec (patch)
tree75d271fd00af7088798eca65ad7afba72723b681
parent8f3e496804d4fb73b76e123a699c94889c4c1ac2 (diff)
SERVER-78217 Renaming view return wrong error on sharded cluster - part 2 (cherry-picked from commit 86118cef805f882dc5442b2a7928367efadebeaa)
-rw-r--r--src/mongo/db/s/rename_collection_coordinator.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/s/rename_collection_coordinator.cpp b/src/mongo/db/s/rename_collection_coordinator.cpp
index 8e87d54a89f..e0207c00e18 100644
--- a/src/mongo/db/s/rename_collection_coordinator.cpp
+++ b/src/mongo/db/s/rename_collection_coordinator.cpp
@@ -594,12 +594,14 @@ ExecutorFuture<void> RenameCollectionCoordinator::_runImpl(
opCtx,
toNss,
criticalSectionReason,
- ShardingCatalogClient::kLocalWriteConcern);
+ ShardingCatalogClient::kLocalWriteConcern,
+ true /*allowViews*/);
criticalSection->promoteRecoverableCriticalSectionToBlockAlsoReads(
opCtx,
toNss,
criticalSectionReason,
- ShardingCatalogClient::kLocalWriteConcern);
+ ShardingCatalogClient::kLocalWriteConcern,
+ true /*allowView*/);
// Make sure the target namespace is not a view
uassert(ErrorCodes::NamespaceExists,