From e28994cc6aed7917f4a90d842686fd7c1eb21dd9 Mon Sep 17 00:00:00 2001 From: Daniel Alabi Date: Thu, 18 Jun 2015 15:08:21 -0400 Subject: SERVER-18815 Rename shard registry's findIfExists(...) to getShard(...) and avoid references to shared pointers to Shard object --- src/mongo/s/client/shard_connection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mongo/s/client/shard_connection.cpp') 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()); -- cgit v1.2.1