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

standalone server removed from cluster 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: None
    • None

      If a standalone server goes down, it is removed from the cluster servers list, so it is not monitored/checked ever again. After it is back up and running, it is not added back.

      One possible solution is to not subscribe it to events as follows.

      module Mongo
        class Cluster
          def initialize(client, addresses, options = {})
            @client = client
            @addresses = addresses
            @options = options.freeze
            @mode = Mode.get(options)
            @servers = addresses.map do |address|
              Server.new(address, options).tap do |server|
                unless @mode == Mongo::Cluster::Mode::Standalone
                  subscribe_to(server, Event::SERVER_ADDED, Event::ServerAdded.new(self))
                  subscribe_to(server, Event::SERVER_REMOVED, Event::ServerRemoved.new(self))
                end
              end
            end
          end
      end
      

            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: