|
I noticed the log line is sometimes printed with the setName for the set being removed as blank:
https://logkeeper.mongodb.org/build/fe4fa63ca9b92ae1c06cce3da7f0f901/test/57feb247be07c4185402a0b9#L698
s20013| 2016-10-12T21:59:55.512+0000 I SHARDING [conn1] ShardRegistry::reload: Removing RSM for
|
This is because the line is printed in ShardRegistry::reload() when a shard that existed previously in the ShardRegistry cache no longer appears in the reload, regardless of whether the shard is a standalone or replica set:
https://github.com/mongodb/mongo/blob/r3.4.0-rc1/src/mongo/s/client/shard_registry.cpp#L305
It's somewhat misleading since, in the standalone case, no ReplicaSetMonitor actually gets removed.
I'd rather this is logged inside of ReplicaSetMonitorManager::removeMonitor, when a ReplicaSetMonitor is actually removed, since it has the added benefit that it will be printed by all code paths that remove a ReplicaSetMonitor (e.g., addShard, removeShard):
https://github.com/mongodb/mongo/blob/r3.4.0-rc1/src/mongo/client/replica_set_monitor_manager.cpp#L126-L128
|