Code in question:
if ( _cs.type() == ConnectionString::SET ) { ReplicaSetMonitorPtr rs = ReplicaSetMonitor::get( _cs.getSetName(), true ); return rs->contains( node ); }
All other places that calls ReplicaSetMonitor::get checks whether it is null or not. One particular case this can be null is when the shard has been removed. Another possible scenario is would be when the shard was newly added, in particular, the case when StaticShardInfo adds the lookup entry for the replica set before the ReplicaSetMonitor has been initialized.
- related to
-
SERVER-8194 Newly added shards shouldn't get put into the mongos' shard lookup table until after creating a ReplicaSetMonitor for it
- Closed