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

Documentation that encourages improper replica setup

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.3.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      >= 1.6

      Replica sets that have two members do not fail over properly because if a member goes down, a new master cannot be elected.

      repl_set_connection.rb has examples of two member replica sets in it's documentation.

      1. @example Connect to a replica set and provide two seed nodes:
      2. ReplSetConnection.new(['localhost', 30000], ['localhost', 30001])
        #
      3. @example Connect to a replica set providing two seed nodes and ensuring a connection to the replica set named 'prod':
      4. ReplSetConnection.new(['localhost', 30000], ['localhost', 30001], :rs_name => 'prod')
        #
      5. @example Connect to a replica set providing two seed nodes and allowing reads from a secondary node:
      6. ReplSetConnection.new(['localhost', 30000], ['localhost', 30001], :read_secondary => true)

      This is an unsafe setup. Please provide a safe setup and note it in the docs.

            Assignee:
            kbanker Kyle Banker
            Reporter:
            btakita Brian Takita
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: