Skip to content

Commit e390361

Browse files
author
Sam Kleinman
committed
DOCS-1068: clarifying notes on commands that turn secondaries into recovering members.
1 parent 86cdcfe commit e390361

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

source/reference/command/compact.txt

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -168,17 +168,18 @@ compact
168168
``force:true`` above for information regarding compacting the
169169
primary.
170170

171-
.. warning:: If you run :dbcommand:`compact` on a secondary,
172-
the secondary will enter a ``RECOVERING`` state to prevent
173-
clients from sending read operations during compaction. Once
174-
the compaction finishes the secondary will automatically
175-
return to ``SECONDARY`` state. See :data:`~replSetGetStatus.members.state`
176-
for more information on states.
177-
178-
Refer to the "`partial script for automating step down
179-
and compaction <https://github.com/mongodb/mongo-snippets/blob/master/js/compact-example.js>`_"
171+
.. warning::
172+
173+
If you run :dbcommand:`compact` on a secondary, the secondary
174+
will enter a ``RECOVERING`` state to prevent clients from
175+
sending read operations during compaction. Once the operation
176+
finishes the secondary will automatically return to
177+
``SECONDARY`` state. See :data:`~replSetGetStatus.members.state`
178+
for more information replica set member states. Refer to the
179+
"`partial script for automating step down and compaction`_"
180180
for an example of this procedure.
181181

182+
182183
- :dbcommand:`compact` is a command issued to a :program:`mongod`.
183184
In a sharded environment, run :dbcommand:`compact` on each shard
184185
separately as a maintenance operation.
@@ -190,3 +191,7 @@ compact
190191
fragmentation.
191192

192193
.. seealso:: :dbcommand:`repairDatabase`
194+
195+
196+
.. _`partial script for automating step down and compaction`:
197+
https://github.com/mongodb/mongo-snippets/blob/master/js/compact-example.js

source/reference/command/touch.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,12 @@ touch
4040
:program:`mongod` stores in memory may displace other records
4141
data in memory and hinder performance. Use with caution in
4242
production systems.
43+
44+
.. warning::
45+
46+
If you run :dbcommand:`touch` on a secondary, the secondary will
47+
enter a ``RECOVERING`` state to prevent clients from sending
48+
read operations during compaction. Once the operation finishes
49+
the secondary will automatically return to ``SECONDARY`` state.
50+
See :data:`~replSetGetStatus.members.state` for more information
51+
on replica set member states.

0 commit comments

Comments
 (0)