Details
-
Bug
-
Resolution: Won't Fix
-
Major - P3
-
None
-
None
-
None
-
None
-
Sharding
Description
if the host:port combination originally refers to a config server node and later a shard node.
To make it easier to catch this we should use unordered_map::insert when populating _hostLookup and add a warning if the insert was unsuccessful (when the host is aready in the map) here:
https://github.com/mongodb/mongo/blob/r4.1.3/src/mongo/s/client/shard_registry.cpp#L593
since this can mean that the host was part of another shard, otherwise it would have been removed here:
https://github.com/mongodb/mongo/blob/r4.1.3/src/mongo/s/client/shard_registry.cpp#L567