[DOCS-792] Documentation incorrect regarding RS configuration members Created: 26/Nov/12  Updated: 30/Oct/23  Resolved: 26/Nov/12

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Bug Priority: Major - P3
Reporter: Jed Smith Assignee: Sam Kleinman (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 11 years, 12 weeks, 2 days ago

 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.



 Comments   
Comment by auto [ 27/Nov/12 ]

Author:

{u'date': u'2012-11-26T19:48:58Z', u'email': u'samk@10gen.com', u'name': u'Sam Kleinman'}

Message: DOCS-792: additional clarifications to replica-set reconfiguration text
Branch: master
https://github.com/mongodb/docs/commit/0517797bef710c9b6cf25bfc131fbd3b243ee8a3

Comment by auto [ 27/Nov/12 ]

Author:

{u'date': u'2012-11-26T17:11:41Z', u'email': u'samk@10gen.com', u'name': u'Sam Kleinman'}

Message: DOCS-792 correcting issue about rs.conf array indexes.
Branch: master
https://github.com/mongodb/docs/commit/474634816d763bf196873d6e0ec2e735b860054d

Comment by Jed Smith [ 26/Nov/12 ]

Three still there, though I see the two new notes.

> After re-configuring the set, the member with the _id of 0 has a priority of 0 so that it cannot become primary.

> After the replica set reconfigures, the set member with the _id of 0 has a priority of 0 and cannot become primary.

> This sequence gives 0 votes to set members with the _id values of 3, 4, and 5.

Comment by Sam Kleinman (Inactive) [ 26/Nov/12 ]

fixed in public, will merge into upstream later this week.

Generated at Thu Feb 08 07:39:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.