You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/administration/replica-sets.txt
+19-16Lines changed: 19 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -157,17 +157,19 @@ operations in the :program:`mongo` shell:
157
157
cfg.members[0].hidden = true
158
158
rs.reconfig(cfg)
159
159
160
-
After re-configuring the set, the member with the ``_id`` of ``0``
161
-
has a priority of ``0`` so that it cannot become primary. The
162
-
other members in the set will not advertise the hidden member in the
163
-
:dbcommand:`isMaster` or :method:`db.isMaster()` output.
160
+
After re-configuring the set, the first member of the set in the
161
+
:data:`members <rs.conf.members>` array will have a priority of ``0``
162
+
so that it cannot become primary. The other members in the set will
163
+
not advertise the hidden member in the :dbcommand:`isMaster` or
164
+
:method:`db.isMaster()` output.
164
165
165
166
.. note::
166
167
167
168
You must send the :method:`rs.reconfig()` command to a set member
168
-
that *can* become :term:`primary`. In the above example, if you issue
169
-
the :method:`rs.reconfig()` operation to the member with the ``_id``
170
-
of ``0``, the operation fails.
169
+
that *can* become :term:`primary`. In the above example, if you
170
+
issue the :method:`rs.reconfig()` operation to a member with a
171
+
:data:`priority <members.[n].priority>` of ``0`` the operation will
172
+
fail.
171
173
172
174
.. note::
173
175
@@ -225,8 +227,8 @@ following sequence of operations in the :program:`mongo` shell:
225
227
cfg.members[0].slaveDelay = 3600
226
228
rs.reconfig(cfg)
227
229
228
-
After the replica set reconfigures, the set member with the ``_id`` of
229
-
``0`` has a priority of ``0`` and cannot become :term:`primary`. The :data:`slaveDelay <members[n].slaveDelay>` value
230
+
After the replica set reconfigures, the first member of the set in the
231
+
:data:`members <rs.conf.members>` array will have a priority of ``0`` and cannot become :term:`primary`. The :data:`slaveDelay <members[n].slaveDelay>` value
230
232
delays both replication and the member's :term:`oplog` by 3600 seconds (1
231
233
hour). Setting :data:`slaveDelay <members[n].slaveDelay>` to a
232
234
non-zero value also sets :data:`hidden <members[n].hidden>` to
@@ -314,13 +316,14 @@ command sequence in the :program:`mongo` shell.
314
316
cfg.members[5].votes = 0
315
317
rs.reconfig(cfg)
316
318
317
-
This sequence gives ``0`` votes to set members with the ``_id``
318
-
values of ``3``, ``4``, and ``5``. This setting allows the set to
319
-
elect these members as :term:`primary` but does not allow them to
320
-
vote in elections. If you have three non-voting members, you can add
321
-
three additional voting members to your set. Place voting members so that
322
-
your designated primary or primaries can reach a majority of votes in
323
-
the event of a network partition.
319
+
This sequence gives ``0`` votes to the fourth, fifth, and sixth
320
+
members of the set according to the order of the :data:`members
321
+
<rs.conf.members>` array in the output of :method:`rs.conf()`. This
322
+
setting allows the set to elect these members as :term:`primary` but
323
+
does not allow them to vote in elections. If you have three non-voting
324
+
members, you can add three additional voting members to your
325
+
set. Place voting members so that your designated primary or primaries
326
+
can reach a majority of votes in the event of a network partition.
0 commit comments