-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
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 }