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

Documentation incorrect regarding RS configuration members

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • None
    • manual
    • None

    Description

      There are numerous cases here:

      http://docs.mongodb.org/manual/administration/replica-sets/

      Where the _id of a member and its index in the rs.conf().members array are conflated (they are not equivalent). As an example, here is a live configuration on one of our replica sets:

      rset:PRIMARY> c = rs.conf()
      {
      	"_id" : "rset",
      	"version" : 23,
      	"members" : [
      		{
      			"_id" : 109,
      			"host" : "scrubbed"
      		},
      		...
      	]
      }

      I cannot index that replica by its _id, 109:

      rset:PRIMARY> c.members[109].priority = 2
      Mon Nov 26 03:58:36 TypeError: c.members[109] has no properties (shell):1

      That is instead me asking for the 110th member of the members array.

      I only saw those errors on the given page, so I'm not sure if it's a systemic misunderstanding and repeated elsewhere; the root assumption seems to be that index in the members array will always match _id, which isn't the case in any of our sets for various reasons.

      Attachments

        Activity

          People

            sam.kleinman Sam Kleinman (Inactive)
            jed Jed Smith
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11 years, 12 weeks, 2 days ago