Skip to content

Commit 947f539

Browse files
authored
DOCSP-53791-clarify-free-space-requirements-for-autoCompact-backport (#14767)
1 parent ffa1a18 commit 947f539

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

content/manual/manual/source/reference/command/autoCompact.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ Definition
2222
files and continuously runs compaction if there is enough free storage space
2323
available.
2424

25-
Before you enable ``autoCompact``, run the :dbcommand:`dbStats` command to
26-
see if you have enough available storage space for compaction to proceed. If
27-
the amount of available space returned by ``dbStats`` is less than
25+
Before you enable ``autoCompact``, run the :pipeline:`$collStats`
26+
aggregation stage with the ``storageStats: {}`` option to see if you have
27+
enough available storage space for compaction to proceed. If the amount of
28+
available space returned by ``freeStorageSize`` is less than
2829
``freeSpaceTargetMB``, background compaction has no effect.
2930

3031
Syntax
@@ -155,4 +156,4 @@ You cannot run ``autoCompact`` against a :binary:`~bin.mongos` instance.
155156
Learn More
156157
----------
157158

158-
- :dbcommand:`compact`
159+
- :dbcommand:`compact`

content/manual/v8.0/source/reference/command/autoCompact.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ Definition
2222
files and continuously runs compaction if there is enough free storage space
2323
available.
2424

25-
Before you enable ``autoCompact``, run the :dbcommand:`dbStats` command to
26-
see if you have enough available storage space for compaction to proceed. If
27-
the amount of available space returned by ``dbStats`` is less than
25+
Before you enable ``autoCompact``, run the :pipeline:`$collStats`
26+
aggregation stage with the ``storageStats: {}`` option to see if you have
27+
enough available storage space for compaction to proceed. If the amount of
28+
available space returned by ``freeStorageSize`` is less than
2829
``freeSpaceTargetMB``, background compaction has no effect.
2930

3031
Syntax
@@ -155,4 +156,4 @@ You cannot run ``autoCompact`` against a :binary:`~bin.mongos` instance.
155156
Learn More
156157
----------
157158

158-
- :dbcommand:`compact`
159+
- :dbcommand:`compact`

0 commit comments

Comments
 (0)