diff options
Diffstat (limited to 'src/mongo/db/s')
-rw-r--r-- | src/mongo/db/s/implicit_create_collection.cpp | 4 | ||||
-rw-r--r-- | src/mongo/db/s/set_shard_version_command.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/s/implicit_create_collection.cpp b/src/mongo/db/s/implicit_create_collection.cpp index 2ba0c9f945b..7ea8c1e1345 100644 --- a/src/mongo/db/s/implicit_create_collection.cpp +++ b/src/mongo/db/s/implicit_create_collection.cpp @@ -97,8 +97,8 @@ public: auto databaseHolder = DatabaseHolder::get(opCtx); auto db = databaseHolder->getDb(opCtx, _ns.db()); if (db) { - Lock::CollectionLock collLock(opCtx, _ns.ns(), MODE_IS); - if (db->getCollection(opCtx, _ns.ns())) { + Lock::CollectionLock collLock(opCtx, _ns, MODE_IS); + if (db->getCollection(opCtx, _ns)) { // Collection already created, no more work needs to be done. return Status::OK(); } diff --git a/src/mongo/db/s/set_shard_version_command.cpp b/src/mongo/db/s/set_shard_version_command.cpp index e96d5a7603d..0eb2fbde66c 100644 --- a/src/mongo/db/s/set_shard_version_command.cpp +++ b/src/mongo/db/s/set_shard_version_command.cpp @@ -229,7 +229,7 @@ public: } boost::optional<Lock::CollectionLock> collLock; - collLock.emplace(opCtx, nss.ns(), MODE_IS); + collLock.emplace(opCtx, nss, MODE_IS); auto* const css = CollectionShardingState::get(opCtx, nss); const ChunkVersion collectionShardVersion = [&] { |