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