@@ -207,7 +207,6 @@ replica set, however there are some important considerations:
207
207
208
208
- The primary node does not replicate the ``compact`` command to the
209
209
secondaries.
210
- - The ``compact`` command blocks writes while it runs.
211
210
- You should run ``compact`` on secondary nodes whenever possible. If
212
211
you cannot run ``compact`` on secondaries, see the :ref:`force
213
212
<compact-force-option>` option.
@@ -256,17 +255,21 @@ Blocking behavior on secondary nodes is version specific.
256
255
- Secondary node is in :replstate:`RECOVERING` state.
257
256
258
257
* - 4.4
259
- - - ``compact`` blocks all write activity.
260
- - No replication possible.
261
- - Reads not permitted.
258
+ - - No replication is possible.
259
+ - Reads are not permitted.
262
260
263
- * - Post 4.4.17, 5.0.12, 6.0.2
264
- - - ``compact`` blocks all write activity.
265
- - A secondary node can replicate while ``compact`` is running.
261
+ * - Post 4.4.17, 5.0.12, and 6.0.2
262
+ - - A secondary node can replicate while ``compact`` is running.
266
263
- Reads permitted.
267
264
268
- When ``compact`` completes, the secondary returns to the
269
- :replstate:`SECONDARY` state.
265
+ Replication status while the ``compact`` command is running depends on
266
+ your specific MongoDB version:
267
+
268
+ - In MongoDB versions ``4.4.9`` and later, the replica set remains in a
269
+ :replstate:`SECONDARY` status.
270
+
271
+ - In MongoDB versions earlier than ``4.4.9``, ``compact`` forces
272
+ the replica set into the :replstate:`RECOVERING` status.
270
273
271
274
For more information about replica set member states, see
272
275
See :ref:`replica-set-member-states`.
0 commit comments