@@ -196,7 +196,6 @@ replica set, however there are some important considerations:
196
196
197
197
- The primary node does not replicate the ``compact`` command to the
198
198
secondaries.
199
- - The ``compact`` command blocks writes while it runs.
200
199
- You should run ``compact`` on secondary nodes whenever possible. If
201
200
you cannot run ``compact`` on secondaries, see the :ref:`force
202
201
<compact-force-option>` option.
@@ -245,17 +244,21 @@ Blocking behavior on secondary nodes is version specific.
245
244
- Secondary node is in :replstate:`RECOVERING` state.
246
245
247
246
* - 4.4
248
- - - ``compact`` blocks all write activity.
249
- - No replication possible.
250
- - Reads not permitted.
247
+ - - No replication is possible.
248
+ - Reads are not permitted.
251
249
252
250
* - Post 4.4.17
253
- - - ``compact`` blocks all write activity.
254
- - A secondary node can replicate while ``compact`` is running.
251
+ - - A secondary node can replicate while ``compact`` is running.
255
252
- Reads permitted.
256
253
257
- When ``compact`` completes, the secondary returns to the
258
- :replstate:`SECONDARY` state.
254
+ Replication status while the ``compact`` command is running depends on
255
+ your specific MongoDB version:
256
+
257
+ - In MongoDB versions ``4.4.9`` and later, the replica set remains in a
258
+ :replstate:`SECONDARY` status.
259
+
260
+ - In MongoDB versions earlier than ``4.4.9``, ``compact`` forces
261
+ the replica set into the :replstate:`RECOVERING` status.
259
262
260
263
For more information about replica set member states, see
261
264
See :ref:`replica-set-member-states`.
0 commit comments