Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-2287

doc for rs.add suggests that shell will get disconnected, which isn't necessarily true

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • v1.3.3
    • None
    • manual
    • None

    Description

      http://docs.mongodb.org/manual/reference/method/rs.add/

      This doc page says:

      This function will disconnect the shell briefly and forces a reconnection as the replica set renegotiates which member will be primary. As a result, the shell will display an error even if this command succeeds.

      This actually isn't always the case. Often times you can use rs.add() to add members and the shell will stay connected. The primary only disconnects its connections if adding the member results in a stepdown/election occurring.
      I am not sure if this behavior has always been so in older versions, but it seems to be the case at least as early as 2.4.x.

      Attachments

        Activity

          People

            bgrabar Bob Grabar
            mikeo@mongodb.com Michael O'Brien
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              9 years, 44 weeks, 5 days ago