summaryrefslogtreecommitdiff
path: root/src/mongo/s/client/shard_connection.cpp
diff options
context:
space:
mode:
authorDaniel Alabi <alabidan@gmail.com>2015-06-18 15:08:21 -0400
committerDaniel Alabi <alabidan@gmail.com>2015-06-18 17:31:17 -0400
commite28994cc6aed7917f4a90d842686fd7c1eb21dd9 (patch)
tree4ed041937bf72fa23d1df99d6fc4aa24d03bc1a6 /src/mongo/s/client/shard_connection.cpp
parent847921de5b1d933fbcf61806c59e7f635111bd2f (diff)
downloadmongo-e28994cc6aed7917f4a90d842686fd7c1eb21dd9.tar.gz
SERVER-18815 Rename shard registry's findIfExists(...) to getShard(...) and avoid references to shared pointers to Shard object
Diffstat (limited to 'src/mongo/s/client/shard_connection.cpp')
-rw-r--r--src/mongo/s/client/shard_connection.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/s/client/shard_connection.cpp b/src/mongo/s/client/shard_connection.cpp
index 80bb58fd7dc..56d8b82ca54 100644
--- a/src/mongo/s/client/shard_connection.cpp
+++ b/src/mongo/s/client/shard_connection.cpp
@@ -288,7 +288,7 @@ namespace {
// Now only check top-level shard connections
for (const ShardId& shardId : all) {
try {
- const auto& shard = grid.shardRegistry()->findIfExists(shardId);
+ const auto shard = grid.shardRegistry()->getShard(shardId);
if (!shard) {
continue;
}
@@ -534,7 +534,7 @@ namespace {
ShardId shardId;
{
- const auto& shard = grid.shardRegistry()->findIfExists(conn.getServerAddress());
+ const auto shard = grid.shardRegistry()->getShard(conn.getServerAddress());
shardId = shard->getId();
cmdBuilder.append("shard", shardId);
cmdBuilder.append("shardHost", shard->getConnString().toString());