diff options
Diffstat (limited to 'src/mongo/s/client/sharding_network_connection_hook.cpp')
-rw-r--r-- | src/mongo/s/client/sharding_network_connection_hook.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/s/client/sharding_network_connection_hook.cpp b/src/mongo/s/client/sharding_network_connection_hook.cpp index 88ed8882b60..7bc307e4ab7 100644 --- a/src/mongo/s/client/sharding_network_connection_hook.cpp +++ b/src/mongo/s/client/sharding_network_connection_hook.cpp @@ -53,7 +53,8 @@ Status ShardingNetworkConnectionHook::validateHost( Status ShardingNetworkConnectionHook::validateHostImpl( const HostAndPort& remoteHost, const executor::RemoteCommandResponse& isMasterReply) { - auto shard = grid.shardRegistry()->getShardForHostNoReload(remoteHost); + auto shard = + Grid::get(getGlobalServiceContext())->shardRegistry()->getShardForHostNoReload(remoteHost); if (!shard) { return {ErrorCodes::ShardNotFound, str::stream() << "No shard found for host: " << remoteHost.toString()}; |