This could cause problems in other parts of the code that try to get that replica set's monitor and expect one to exist.
The problem appears to be in StaticShardInfo.reload(). If a new shard was added via a different mongos, reload() will put the new shard's information into StaticShardInfo's data structures, _lookup and _rsLookup without creating a ReplicaSetMonitor for it first. Fix would be to check every shard getting added to see if it's connection string is of type SET, and if so call ReplicaSetMonitor::createIfNeeded on it's connection string.
- is related to
-
SERVER-8113 Shard::containsNode does not check whether ReplicaSetMonitor::get returns null
- Closed