summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mongo/db/s/config/configsvr_create_collection_command.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/s/config/configsvr_create_collection_command.cpp b/src/mongo/db/s/config/configsvr_create_collection_command.cpp
index 75e8be99c72..1748919c0a3 100644
--- a/src/mongo/db/s/config/configsvr_create_collection_command.cpp
+++ b/src/mongo/db/s/config/configsvr_create_collection_command.cpp
@@ -81,7 +81,9 @@ public:
auto const catalogClient = Grid::get(opCtx)->catalogClient();
- auto scopedLock =
+ auto scopedDbLock =
+ ShardingCatalogManager::get(opCtx)->serializeCreateDatabase(opCtx, ns().db());
+ auto scopedCollLock =
ShardingCatalogManager::get(opCtx)->serializeCreateCollection(opCtx, ns());
auto dbDistLock = uassertStatusOK(catalogClient->getDistLockManager()->lock(