diff options
Diffstat (limited to 'src/mongo/db/commands/create_indexes_cmd.cpp')
-rw-r--r-- | src/mongo/db/commands/create_indexes_cmd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/commands/create_indexes_cmd.cpp b/src/mongo/db/commands/create_indexes_cmd.cpp index 1b799c70c83..51e7007e5b9 100644 --- a/src/mongo/db/commands/create_indexes_cmd.cpp +++ b/src/mongo/db/commands/create_indexes_cmd.cpp @@ -317,8 +317,8 @@ bool indexesAlreadyExist(OperationContext* opCtx, void assertNoMovePrimaryInProgress(OperationContext* opCtx, const NamespaceString& nss) { try { - auto scopedDss = DatabaseShardingState::assertDbLockedAndAcquire( - opCtx, nss.dbName(), DSSAcquisitionMode::kShared); + const auto scopedDss = + DatabaseShardingState::assertDbLockedAndAcquireShared(opCtx, nss.dbName()); Lock::CollectionLock collLock(opCtx, nss, MODE_IX); |