Skip to content

Commit b6be51f

Browse files
authored
DOCSP-33284 Fix Compact Behavior Notes (#4797)
* DOCSP-33284 Fix Compact Behavior Notes * * * * * * * * * * * *
1 parent 92e829f commit b6be51f

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

source/reference/command/compact.txt

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ replica set, however there are some important considerations:
218218

219219
- The primary node does not replicate the ``compact`` command to the
220220
secondaries.
221-
- The ``compact`` command blocks writes while it runs.
222221
- You should run ``compact`` on secondary nodes whenever possible. If
223222
you cannot run ``compact`` on secondaries, see the :ref:`force
224223
<compact-force-option>` option.
@@ -262,17 +261,21 @@ Blocking behavior on secondary nodes is version specific.
262261
- Blocking Behavior
263262

264263
* - 4.4
265-
- - ``compact`` blocks all write activity.
266-
- No replication possible.
267-
- Reads not permitted.
264+
- - No replication is possible.
265+
- Reads are not permitted.
268266

269267
* - Post 4.4.17, 5.0.12, 6.0.2, 6.1.0
270-
- - ``compact`` blocks all write activity.
271-
- A secondary node can replicate while ``compact`` is running.
268+
- - A secondary node can replicate while ``compact`` is running.
272269
- Reads permitted.
273270

274-
When ``compact`` completes, the secondary returns to the
275-
:replstate:`SECONDARY` state.
271+
Replication status while the ``compact`` command is running depends on
272+
your specific MongoDB version:
273+
274+
- In MongoDB versions ``4.4.9`` and later, the replica set remains in a
275+
:replstate:`SECONDARY` status.
276+
277+
- In MongoDB versions earlier than ``4.4.9``, ``compact`` forces
278+
the replica set into the :replstate:`RECOVERING` status.
276279

277280
For more information about replica set member states, see
278281
See :ref:`replica-set-member-states`.

0 commit comments

Comments
 (0)