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

servers removed from cluster and seed addresses and not added back

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.0.0
    • Affects Version/s: 2.0.0
    • Component/s: Replica Set
    • None

      ismaster failure causes removal of a server from the cluster, and in handling the remove, the server is removed from the original seed addresses. If the cluster server array becomes empty, it does not ever add a server back after recovery, at least in the test environment.

      The original seed list of address should at least be preserved. This can be done via the following.

      module Mongo
        class Cluster
          def remove(address)
            removed_servers = @servers.reject!{ |server| server.address.seed == address }
            removed_servers.each{ |server| server.disconnect! } if removed_servers
          end
        end
      end
      

      The line removed from the #remove method is:

            addresses.reject!{ |addr| addr == address }
      

            Assignee:
            durran.jordan@mongodb.com Durran Jordan
            Reporter:
            gjmurakami Gary Murakami
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: