diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2020-12-04 08:13:42 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-01-03 11:56:04 +0000 |
commit | 5431150d116b70fc9401c46deaacc9ae049f064e (patch) | |
tree | d1784b3cb2355cee9401e539f4574f0172995d8d /src/mongo/db/s/config/configsvr_shard_collection_command.cpp | |
parent | 98a7731d21a8746e584f7092aadbee60a5fad6ef (diff) | |
download | mongo-5431150d116b70fc9401c46deaacc9ae049f064e.tar.gz |
SERVER-53227 Move the DistLockManager to only be available on MongoD
Diffstat (limited to 'src/mongo/db/s/config/configsvr_shard_collection_command.cpp')
-rw-r--r-- | src/mongo/db/s/config/configsvr_shard_collection_command.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/s/config/configsvr_shard_collection_command.cpp b/src/mongo/db/s/config/configsvr_shard_collection_command.cpp index 7cfc6445161..816369f690a 100644 --- a/src/mongo/db/s/config/configsvr_shard_collection_command.cpp +++ b/src/mongo/db/s/config/configsvr_shard_collection_command.cpp @@ -41,6 +41,7 @@ #include "mongo/db/query/collation/collator_factory_interface.h" #include "mongo/db/repl/read_concern_args.h" #include "mongo/db/s/config/sharding_catalog_manager.h" +#include "mongo/db/s/dist_lock_manager.h" #include "mongo/db/s/shard_key_util.h" #include "mongo/s/balancer_configuration.h" #include "mongo/s/catalog/type_database.h" @@ -248,10 +249,10 @@ public: // Make the distlocks boost::optional so that they can be released by being reset below. boost::optional<DistLockManager::ScopedDistLock> dbDistLock( - uassertStatusOK(catalogClient->getDistLockManager()->lock( + uassertStatusOK(DistLockManager::get(opCtx)->lock( opCtx, nss.db(), "shardCollection", DistLockManager::kDefaultLockTimeout))); boost::optional<DistLockManager::ScopedDistLock> collDistLock( - uassertStatusOK(catalogClient->getDistLockManager()->lock( + uassertStatusOK(DistLockManager::get(opCtx)->lock( opCtx, nss.ns(), "shardCollection", DistLockManager::kDefaultLockTimeout))); // Ensure sharding is allowed on the database. |