Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-932

Cluster can have references to duplicate nodes

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 2.0.4
    • 2.0.6
    • Replica Set
    • None

    Description

      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.

      Attachments

        Activity

          People

            emily.stolfo Emily Stolfo
            cheald Chris Heald
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: