diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2016-06-29 17:20:59 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2016-07-06 20:31:46 -0400 |
commit | 56ebd8ce50af94b5beaa8af8f6b2da1d1accd44a (patch) | |
tree | 7b79ef6258aca638537bdd18ee481100651c7ad7 /src/mongo/s/sharding_initialization.h | |
parent | b3589be5ce8fe43b6f36a02fb80ed4aa358eee41 (diff) | |
download | mongo-56ebd8ce50af94b5beaa8af8f6b2da1d1accd44a.tar.gz |
SERVER-24781 CSRS primary should cleanup dist locks on promotion
This also reverts commit cc904854866b1cd1a25508573eeab322c0dacbff.
Diffstat (limited to 'src/mongo/s/sharding_initialization.h')
-rw-r--r-- | src/mongo/s/sharding_initialization.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/mongo/s/sharding_initialization.h b/src/mongo/s/sharding_initialization.h index a782dc6474a..0ecdd2a3508 100644 --- a/src/mongo/s/sharding_initialization.h +++ b/src/mongo/s/sharding_initialization.h @@ -31,6 +31,8 @@ #include <cstdint> #include <memory> +#include "mongo/base/string_data.h" +#include "mongo/bson/oid.h" #include "mongo/stdx/functional.h" namespace mongo { @@ -55,10 +57,22 @@ using ShardingEgressMetadataHookBuilder = } // namespace rpc /** + * Fixed process identifier for the dist lock manager running on a config server. + */ +extern const StringData kDistLockProcessIdForConfigServer; + +/** + * Generates a uniform string to be used as a process id for the distributed lock manager. + */ +std::string generateDistLockProcessId(OperationContext* txn); + +/** * Takes in the connection string for reaching the config servers and initializes the global * ShardingCatalogClient, ShardingCatalogManager, ShardRegistry, and Grid objects. */ -Status initializeGlobalShardingState(const ConnectionString& configCS, +Status initializeGlobalShardingState(OperationContext* txn, + const ConnectionString& configCS, + StringData distLockProcessId, std::unique_ptr<ShardFactory> shardFactory, rpc::ShardingEgressMetadataHookBuilder hookBuilder, ShardingCatalogManagerBuilder catalogManagerBuilder); |