summaryrefslogtreecommitdiff
path: root/src/mongo/s/client/shard_registry.h
diff options
context:
space:
mode:
authorMisha Tyulenev <misha@mongodb.com>2016-01-06 10:17:01 -0500
committerMisha Tyulenev <misha@mongodb.com>2016-01-06 10:21:34 -0500
commita05ba516fb340bd7a22480303c8d647b6d6c9874 (patch)
tree54fe45c04f3f1b6d108f77be4516d7b8a4adfab4 /src/mongo/s/client/shard_registry.h
parentaaf53b13854fde5271bb6e394295bd2ed6c56736 (diff)
downloadmongo-a05ba516fb340bd7a22480303c8d647b6d6c9874.tar.gz
SERVER-21906 always use ReplicaSetMonitor when updating ShardRegistry lookup maps
Diffstat (limited to 'src/mongo/s/client/shard_registry.h')
-rw-r--r--src/mongo/s/client/shard_registry.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mongo/s/client/shard_registry.h b/src/mongo/s/client/shard_registry.h
index 6c18173505a..dec0f770803 100644
--- a/src/mongo/s/client/shard_registry.h
+++ b/src/mongo/s/client/shard_registry.h
@@ -150,12 +150,13 @@ public:
/**
* Updates _lookup and _rsLookup based on the given new version of the given Shard's
- * ConnectionString.
+ * ConnectionString. If ConnectionString is not specified the maps are updated with hosts
+ * from the ReplicaSetMonitor.
* Used to update the ShardRegistry when a change in replica set membership is detected by the
* ReplicaSetMonitor.
*/
void updateLookupMapsForShard(std::shared_ptr<Shard> shard,
- const ConnectionString& newConnString);
+ boost::optional<const ConnectionString&> newConnString);
/**
* Returns a shared pointer to the shard object with the given shard id.
@@ -348,7 +349,7 @@ private:
/**
* Creates a shard based on the specified information and puts it into the lookup maps.
*/
- void _addShard_inlock(const ShardType& shardType);
+ void _addShard_inlock(const ShardType& shardType, bool passHostName);
/**
* Adds the "config" shard (representing the config server) to the shard registry.
@@ -356,7 +357,7 @@ private:
void _addConfigShard_inlock();
void _updateLookupMapsForShard_inlock(std::shared_ptr<Shard> shard,
- const ConnectionString& newConnString);
+ boost::optional<const ConnectionString&> newConnString);
std::shared_ptr<Shard> _findUsingLookUp(const ShardId& shardId);