diff options
author | Spencer T Brody <spencer@mongodb.com> | 2015-09-11 15:47:37 -0400 |
---|---|---|
committer | Spencer T Brody <spencer@mongodb.com> | 2015-09-11 16:08:55 -0400 |
commit | 093c1c0c988752d76bf919ec8a6e85ae257964c2 (patch) | |
tree | e0af0f45f2165445691d07f3a522a651982d4bf7 | |
parent | 522f5a2bff9cc41e56520af2deedd62654f23552 (diff) | |
download | mongo-093c1c0c988752d76bf919ec8a6e85ae257964c2.tar.gz |
SERVER-20270 SERVER-20294 Make sure to update ShardRegistry's _configServerCS on CSRS membership changes
-rw-r--r-- | src/mongo/s/config.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/s/config.cpp b/src/mongo/s/config.cpp index d7b0801aad8..74c89bf8e2d 100644 --- a/src/mongo/s/config.cpp +++ b/src/mongo/s/config.cpp @@ -797,8 +797,12 @@ void ConfigServer::replicaSetChangeShardRegistryUpdateHook(const string& setName auto shard = grid.shardRegistry()->lookupRSName(setName); if (shard) { // Inform the ShardRegsitry of the new connection string for the shard. - grid.shardRegistry()->updateLookupMapsForShard( - std::move(shard), fassertStatusOK(28805, ConnectionString::parse(newConnectionString))); + auto connString = fassertStatusOK(28805, ConnectionString::parse(newConnectionString)); + if (shard->isConfig()) { + grid.shardRegistry()->updateConfigServerConnectionString(connString); + } else { + grid.shardRegistry()->updateLookupMapsForShard(std::move(shard), connString); + } } } |