@@ -23,17 +23,20 @@ compact
23
23
24
24
You may also specify the following options:
25
25
26
- .. option:: force: true
26
+ :param force:
27
27
28
28
.. versionchanged:: 2.2 :dbcommand:`compact` blocks activities only
29
29
for its database.
30
30
31
- To run on the primary node in a :term:`replica set`. Otherwise,
32
- the :dbcommand:`compact` command returns an error when invoked on
33
- a :term:`replica set` primary because the command blocks all
34
- other activity.
31
+ The ``force`` specifies whether the :dbcommand:`compact` command
32
+ can run on the primary node in a :term:`replica set`. Set to
33
+ ``true`` to run the :dbcommand:`compact` command on the primary
34
+ node in a :term:`replica set`. Otherwise, the
35
+ :dbcommand:`compact` command returns an error when invoked on a
36
+ :term:`replica set` primary because the command blocks all other
37
+ activity.
35
38
36
- .. option:: paddingFactor: <factor>
39
+ :param paddingFactor:
37
40
38
41
.. versionadded:: v2.2
39
42
@@ -70,19 +73,19 @@ compact
70
73
71
74
db.runCommand ( { compact: '<collection>', paddingFactor: 1.1 } )
72
75
73
- .. option:: paddingBytes: <bytes>
76
+ :param paddingBytes:
74
77
75
78
.. versionadded:: 2.2
76
79
77
- To specify a padding as an absolute number of bytes. Specifying
78
- ``paddingBytes`` can be useful if your documents start small but
79
- then increase in size significantly. For example,if your
80
- documents are initially 40 bytes long and you grow them by 1KB,
81
- using ``paddingBytes: 1024`` might be reasonable since using
82
- ``paddingFactor: 4.0`` would specify a record size of 160 bytes
83
- (``4.0`` times the initial document size), which would only
84
- provide a padding of 120 bytes (i.e. record size of 160 bytes
85
- minus the document size).
80
+ The ``paddingBytes`` sets the padding as an absolute number
81
+ of bytes. Specifying ``paddingBytes`` can be useful if your
82
+ documents start small but then increase in size significantly.
83
+ For example,if your documents are initially 40 bytes long and you
84
+ grow them by 1KB, using ``paddingBytes: 1024`` might be
85
+ reasonable since using ``paddingFactor: 4.0`` would specify a
86
+ record size of 160 bytes (``4.0`` times the initial document
87
+ size), which would only provide a padding of 120 bytes (i.e.
88
+ record size of 160 bytes minus the document size).
86
89
87
90
With the following command, you can use the ``paddingBytes``
88
91
option of the :dbcommand:`compact` command to set the padding
0 commit comments