Details
-
Task
-
Resolution: Done
-
Minor - P4
-
None
-
None
Description
The documentation of replica sets is not explicit enough that cfg.members is a 0-indexed array rather than an associative array:
http://docs.mongodb.org/manual/administration/replica-sets/
For example, cfg.members[1] is referring to the second member of the array, not the member with _id: 1. Initially the _ids will match, but this won't be the case if members are deleted from a replica set.