diff options
author | Ben Caimano <ben.caimano@10gen.com> | 2019-03-11 11:28:47 -0400 |
---|---|---|
committer | Ben Caimano <ben.caimano@10gen.com> | 2019-04-16 16:24:22 -0400 |
commit | d48f6caba6f97a578828d89ec2b95c41cbc5c67a (patch) | |
tree | 7ec768d3f9c4287fcd028f403a41bdd0b87c1cb3 /src/mongo/db/s/sharding_initialization_mongod.h | |
parent | 6fd5b4d17b87aa652381fd28cefe2a7eb5ec8d5d (diff) | |
download | mongo-d48f6caba6f97a578828d89ec2b95c41cbc5c67a.tar.gz |
SERVER-39818 Split RSM notification functionality into a new class
Diffstat (limited to 'src/mongo/db/s/sharding_initialization_mongod.h')
-rw-r--r-- | src/mongo/db/s/sharding_initialization_mongod.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mongo/db/s/sharding_initialization_mongod.h b/src/mongo/db/s/sharding_initialization_mongod.h index e26302b4bb2..a205d68d1b2 100644 --- a/src/mongo/db/s/sharding_initialization_mongod.h +++ b/src/mongo/db/s/sharding_initialization_mongod.h @@ -30,6 +30,7 @@ #pragma once #include "mongo/base/string_data.h" +#include "mongo/client/replica_set_change_notifier.h" #include "mongo/db/s/sharding_state.h" #include "mongo/db/s/type_shard_identity.h" #include "mongo/stdx/functional.h" @@ -60,6 +61,10 @@ public: static ShardingInitializationMongoD* get(OperationContext* opCtx); static ShardingInitializationMongoD* get(ServiceContext* service); + void initializeShardingEnvironmentOnShardServer(OperationContext* opCtx, + const ShardIdentity& shardIdentity, + StringData distLockProcessId); + /** * If started with --shardsvr, initializes sharding awareness from the shardIdentity document on * disk, if there is one. @@ -94,8 +99,8 @@ public: * Updates the config server field of the shardIdentity document with the given connection * string. */ - static Status updateShardIdentityConfigString(OperationContext* opCtx, - const ConnectionString& newConnectionString); + static void updateShardIdentityConfigString(OperationContext* opCtx, + const ConnectionString& newConnectionString); /** * For testing only. Mock the initialization method used by initializeFromConfigConnString and @@ -112,6 +117,8 @@ private: // Function for initializing the sharding environment components (i.e. everything on the Grid) ShardingEnvironmentInitFunc _initFunc; + + ReplicaSetChangeListenerHandle _replicaSetChangeListener; }; /** |