Skip to content

Commit 3c0f28f

Browse files
author
Sam Kleinman
committed
DOCS-578 general edits
1 parent 3009c8b commit 3c0f28f

File tree

1 file changed

+24
-11
lines changed

1 file changed

+24
-11
lines changed

source/tutorial/force-member-to-be-primary.txt

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,10 @@ This procedure assumes this configuration:
109109

110110
.. code-block:: javascript
111111

112-
db.adminCommand({replSetFreeze:0})
112+
rs.freeze()
113+
114+
The :method:`rs.freeze()` provides a wrapper around the
115+
:dbcommand:`replSetFreeze` database command.
113116

114117
.. _replica-set-force-member-to-be-primary-via-dbcommands:
115118

@@ -118,30 +121,40 @@ Force a Member to be Primary Using Database Commands
118121

119122
.. versionchanged:: 1.8
120123

121-
For this procedure, assume you have a :term:`replica set` with members
122-
``A``, ``B``, and ``C`` where ``A`` is current :term:`primary`. To
123-
make ``B`` the primary, use the :method:`rs.freeze()` and
124-
:method:`rs.stepDown()` methods that wrap the
125-
:dbcommand:`replSetFreeze` and :dbcommand:`replSetStepDown` commands.
124+
Consider a :term:`replica set` with the following members:
125+
126+
- ``mdb0.example.net`` - the current :term:`primary`.
127+
- ``mdb1.example.net`` - a :term:`secondary`.
128+
- ``mdb2.example.net`` - a secondary .
129+
130+
To force a member to become primary use the following procedure:
126131

127132
1. In a :program:`mongo` shell, run :method:`rs.status()` to ensure your replica
128133
set is running as expected.
129134

130-
#. In a :program:`mongo` shell connected to ``C``, freeze ``C`` so that it does
131-
not attempt to become primary for 120 seconds.
135+
#. In a :program:`mongo` shell connected to the :program:`mongod`
136+
instance running on ``mdb2.example.net``, freeze
137+
``mdb2.example.net`` so that it does not attempt to become primary
138+
for 120 seconds.
132139

133140
.. code-block:: javascript
134141

135142
rs.freeze(120)
136143

137-
#. In a :program:`mongo` shell connected to ``A``, step down ``A`` so that it is not
138-
eligible to become primary for 120 seconds:
144+
#. In a :program:`mongo` shell connected the :program:`mongod` running
145+
on ``mdb0.example.net``, step down this instance that the
146+
:program:`mongod` is not eligible to become primary for 120
147+
seconds:
139148

140149
.. code-block:: javascript
141150

142151
rs.stepDown(120)
143152

144-
``B`` becomes primary.
153+
``mdb1.example.net`` becomes primary.
145154

146155
.. note:: During the transition, there is a short window where
147156
the set does not have a primary.
157+
158+
For more information, consider the :method:`rs.freeze()` and
159+
:method:`rs.stepDown()` methods that wrap the
160+
:dbcommand:`replSetFreeze` and :dbcommand:`replSetStepDown` commands.

0 commit comments

Comments
 (0)