-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 2.0.4
-
Component/s: Replica Set
-
None
I have a single-node replica set which contains a single node, "luna:27019", listening on 0.0.0.0
When I connect with anything except the name known to the RS, I end up with duplicate servers in the cluster list:
> m = Mongo::Client.new ["localhost:27019"], replica_set: "kerrigan", read: {mode: :secondary_preferred} => #<Mongo::Client:0x2384 cluster=localhost:27019, luna:27019> > m.cluster => #<Mongo::Cluster:0x2386 servers=[#<Mongo::Server:0x2388 address=luna:27019>, #<Mongo::Server:0x2390 address=localhost:27019>] topology=Replica Set>
This is because the seed list and the discovered node list are shared. These should probably be split, so that the seeds are kept separate from the discovered nodes, and only used to find a node to discover topology from.
This server list is then used during server selection, so it's possible that seeds duplicating known nodes could cause those nodes to be weighted more heavily for operation selection.