@@ -118,16 +118,16 @@ Elections
118
118
When you initialize a replica set for the first time, and when any
119
119
failover occurs, an election takes place to decide which member should
120
120
become :term:`primary`. A primary is the only member in the replica
121
- set that can accept write commands such as :func:`insert`,
122
- :func:`update`, and :func:`delete`.
123
- .. TODO verify above function references .
121
+ set that can accept write commands such as :func:`insert()
122
+ <db.collection.insert()>`, :func:`update() <db.collection.update()>`,
123
+ and :func:`remove() <db.collection.remove` .
124
124
125
125
Elections are the process replica set members use to
126
- select the primary member in a cluster. Elections follow two events:
127
- a primary member that "steps down" or a :term:`secondary` member that
126
+ select the primary in a cluster. Elections follow two events:
127
+ a primary that "steps down" or a :term:`secondary` that
128
128
loses contact with a :term:`primary` member. All members have one vote
129
129
in an election, and every :program:`mongod` can veto an election. A
130
- single member's veto will invalidate the election.
130
+ single veto will invalidate the election.
131
131
132
132
An existing primary will step down in response to the
133
133
:dbcommand:`replSetStepDown` command, or if it sees that one of
@@ -143,7 +143,7 @@ In an election, every member, including :ref:`hidden
143
143
<replica-set-hidden-members>` members, :ref:`arbiters
144
144
<replica-set-arbiters>`, and even recovering members get a single
145
145
vote. Members will give votes to every eligible member that calls an
146
- election. A primary is elected when one member receives a majority of the votes in the set.
146
+ election.
147
147
148
148
A member of the set will veto an election under the following
149
149
conditions:
@@ -194,6 +194,24 @@ aware of the following conditions and possible situations:
194
194
:term:`primary` until the member with the highest priority catches up
195
195
to the latest operation.
196
196
197
+ Each member in a replica set has only one vote, by default. You may
198
+ change the number of votes each member has to allow for larger replica
199
+ sets. Each replica set is limited to 12 total members with 7 voting
200
+ members.
201
+
202
+ - The number of votes is modifiable in the :data:`replica set configuration <members[n].votes>`
203
+
204
+ - The number of votes each member has can be any non-negative integer,
205
+ but it is highly recommended each member has 1 or 0 votes.
206
+
207
+ - To select a member to be a "preferred primary", modify the member's
208
+ :ref:`priority value <replica-set-node-priority-configuration>`
209
+ instead of adjusting the number of votes the member has.
210
+
211
+ .. TODO verify this. what should one do when >7 members are in a set?
212
+ - When there are more than seven members in a replica set, adjust the
213
+ number of votes for each active member.
214
+
197
215
Syncing
198
216
-------
199
217
0 commit comments