Skip to content

Commit 6bf0c61

Browse files
DOCSP-34782 Atlas Support for Administration Commands (#5745) (#9476)
* DOCSP-34782 Atlas Support for Administration Commands (#5745) * Fixes formatting issues * Fixes formatting issues --------- Co-authored-by: pierwill <[email protected]>
1 parent 2332cb1 commit 6bf0c61

30 files changed

+1444
-953
lines changed

source/reference/command/cloneCollectionAsCapped.txt

+26-9
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,35 @@ Definition
2020
within the same database. The operation does not affect the
2121
original non-capped collection.
2222

23-
The command has the following syntax:
23+
Compatibility
24+
-------------
2425

25-
.. code-block:: javascript
26+
This command is available in deployments hosted in the following environments:
2627

27-
{ cloneCollectionAsCapped: <existing collection>,
28-
toCollection: <capped collection>,
29-
size: <capped size>,
30-
writeConcern: <document>,
31-
comment: <any>
32-
}
28+
.. include:: /includes/fact-environments-atlas-only.rst
3329

34-
The command takes the following fields:
30+
.. include:: /includes/fact-environments-atlas-support-no-free-or-serverless.rst
31+
32+
.. include:: /includes/fact-environments-onprem-only.rst
33+
34+
Syntax
35+
------
36+
37+
The command has the following syntax:
38+
39+
.. code-block:: javascript
40+
41+
{ cloneCollectionAsCapped: <existing collection>,
42+
toCollection: <capped collection>,
43+
size: <capped size>,
44+
writeConcern: <document>,
45+
comment: <any>
46+
}
47+
48+
Command Fields
49+
~~~~~~~~~~~~~~
50+
51+
The command takes the following fields:
3552

3653
.. list-table::
3754
:header-rows: 1

source/reference/command/collMod.txt

+22-9
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,34 @@ Definition
2828
views. For discussion of on-demand materialized views, see
2929
:pipeline:`$merge` instead.
3030

31-
The command
32-
takes the following prototype form:
31+
Compatibility
32+
-------------
3333

34-
.. note:: Starting in MongoDB 4.2
34+
This command is available in deployments hosted in the following environments:
3535

36-
- .. include:: /includes/collMod-note.rst
36+
.. include:: /includes/fact-environments-atlas-only.rst
3737

38-
- .. include:: /includes/extracts/views-restriction-output-to-disk.rst
38+
.. include:: /includes/fact-environments-atlas-support-all.rst
3939

40-
.. code-block:: javascript
40+
.. include:: /includes/fact-environments-onprem-only.rst
41+
42+
Syntax
43+
------
44+
45+
The command has the following syntax:
46+
47+
.. note:: Starting in MongoDB 4.2
48+
49+
- .. include:: /includes/collMod-note.rst
50+
51+
- .. include:: /includes/extracts/views-restriction-output-to-disk.rst
52+
53+
.. code-block:: javascript
4154

42-
db.runCommand( { collMod: <collection or view>, <option1>: <value1>, <option2>: <value2> ... } )
55+
db.runCommand( { collMod: <collection or view>, <option1>: <value1>, <option2>: <value2> ... } )
4356

44-
For the ``<collection or view>``, specify the name of a collection
45-
or view in the current database.
57+
For the ``<collection or view>``, specify the name of a collection
58+
or view in the current database.
4659

4760
Options
4861
-------

source/reference/command/compact.txt

+55-39
Original file line numberDiff line numberDiff line change
@@ -21,54 +21,70 @@ Definition
2121
:ref:`WiredTiger <storage-wiredtiger>` databases, this command will release
2222
unneeded disk space to the operating system.
2323

24-
:dbcommand:`compact` has the following form:
24+
Compatibility
25+
-------------
2526

26-
.. code-block:: javascript
27+
This command is available in deployments hosted in the following environments:
2728

28-
{ compact: <collection name> }
29+
.. include:: /includes/fact-environments-atlas-only.rst
2930

30-
:dbcommand:`compact` takes the following fields:
31+
.. include:: /includes/fact-environments-atlas-support-no-free.rst
3132

32-
.. note:: Starting in MongoDB 4.2
33+
.. include:: /includes/fact-environments-onprem-only.rst
34+
35+
Syntax
36+
------
37+
38+
The command has the following syntax:
39+
40+
.. code-block:: javascript
41+
42+
{ compact: <collection name> }
3343

44+
Command Fields
45+
--------------
3446

35-
MongoDB removes the MMAPv1 storage engine and the MMAPv1 specific
36-
options ``paddingFactor``, ``paddingBytes``, ``preservePadding``
37-
for :dbcommand:`compact`.
47+
The command takes the following fields:
3848

49+
.. note:: Starting in MongoDB 4.2
3950

40-
.. list-table::
41-
:header-rows: 1
42-
:widths: 20 20 80
51+
MongoDB removes the MMAPv1 storage engine and the MMAPv1 specific
52+
options ``paddingFactor``, ``paddingBytes``, ``preservePadding``
53+
for :dbcommand:`compact`.
54+
55+
56+
.. list-table::
57+
:header-rows: 1
58+
:widths: 20 20 80
59+
60+
* - Field
61+
- Type
62+
- Description
63+
64+
* - ``compact``
65+
- string
66+
- The name of the collection.
67+
68+
* - ``force``
69+
- flag
70+
- .. _compact-force-option:
71+
72+
Optional. Starting in v4.4, if specified, forces
73+
:dbcommand:`compact` to run on the :term:`primary` in
74+
a :term:`replica set`. Before v4.4, this boolean field
75+
enabled :dbcommand:`compact` to run on the :term:`primary`
76+
in a :term:`replica set` if the value was ``true`` and
77+
returned an error when run on a :term:`primary` if the
78+
value was ``false``, because the command blocked all other
79+
operations.
4380

44-
* - Field
45-
- Type
46-
- Description
47-
48-
* - ``compact``
49-
- string
50-
- The name of the collection.
51-
52-
* - ``force``
53-
- flag
54-
- .. _compact-force-option:
55-
56-
Optional. Starting in v4.4, if specified, forces
57-
:dbcommand:`compact` to run on the :term:`primary` in
58-
a :term:`replica set`. Before v4.4, this boolean field
59-
enabled :dbcommand:`compact` to run on the :term:`primary`
60-
in a :term:`replica set` if the value was ``true`` and
61-
returned an error when run on a :term:`primary` if the
62-
value was ``false``, because the command blocked all other
63-
operations.
64-
65-
Starting in v4.4, :dbcommand:`compact` does not block
66-
:ref:`crud` on the database it is compacting.
67-
68-
* - ``comment``
69-
- any
70-
- .. include:: /includes/extracts/comment-content.rst
71-
.. versionadded:: 4.4
81+
Starting in v4.4, :dbcommand:`compact` does not block
82+
:ref:`crud` on the database it is compacting.
83+
84+
* - ``comment``
85+
- any
86+
- .. include:: /includes/extracts/comment-content.rst
87+
.. versionadded:: 4.4
7288

7389

7490
.. _compact-authentication:

source/reference/command/convertToCapped.txt

+85-68
Original file line numberDiff line numberDiff line change
@@ -22,74 +22,91 @@ convertToCapped
2222
non-capped collection to a :term:`capped collection` within the same
2323
database.
2424

25-
The command has the following syntax:
26-
27-
.. code-block:: javascript
28-
29-
{ convertToCapped: <collection>,
30-
size: <capped size>,
31-
writeConcern: <document>,
32-
comment: <any>
33-
}
34-
35-
The command takes the following fields:
36-
37-
.. list-table::
38-
:header-rows: 1
39-
:widths: 20 80
40-
41-
* - Field
42-
- Description
43-
44-
* - convertToCapped
45-
- The name of the existing collection to convert.
46-
47-
* - size
48-
- The maximum size, in bytes, for the capped collection.
49-
50-
* - writeConcern
51-
52-
- Optional. A document expressing the :doc:`write concern
53-
</reference/write-concern>` of the :dbcommand:`drop` command.
54-
Omit to use the default write concern.
55-
56-
* - ``comment``
57-
58-
- .. include:: /includes/extracts/comment-content.rst
59-
60-
:dbcommand:`convertToCapped` takes an existing collection
61-
(``<collection>``) and transforms it into a capped collection with
62-
a maximum size in bytes, specified by the ``size`` argument
63-
(``<capped size>``).
64-
65-
During the conversion process, the :dbcommand:`convertToCapped`
66-
command exhibits the following behavior:
67-
68-
- MongoDB traverses the documents in the original collection in
69-
:term:`natural order` and loads the documents into a new
70-
capped collection.
71-
72-
- If the ``capped size`` specified for the capped collection is
73-
smaller than the size of the original uncapped collection, then
74-
MongoDB will overwrite documents in the capped collection based
75-
on insertion order, or *first in, first out* order.
76-
77-
- Internally, to convert the collection, MongoDB uses the following
78-
procedure
79-
80-
- :dbcommand:`cloneCollectionAsCapped` command creates the capped
81-
collection and imports the data.
82-
83-
- MongoDB drops the original collection.
84-
85-
- :dbcommand:`renameCollection` renames the new capped collection
86-
to the name of the original collection.
87-
88-
- .. include:: /includes/fact-database-lock.rst
89-
90-
.. warning::
91-
92-
.. include:: /includes/fact-convertToCapped-indexes.rst
25+
Compatibility
26+
-------------
27+
28+
This command is available in deployments hosted in the following environments:
29+
30+
.. include:: /includes/fact-environments-atlas-only.rst
31+
32+
.. include:: /includes/fact-environments-atlas-support-no-serverless.rst
33+
34+
.. include:: /includes/fact-environments-onprem-only.rst
35+
36+
Syntax
37+
------
38+
39+
The command has the following syntax:
40+
41+
.. code-block:: javascript
42+
43+
{ convertToCapped: <collection>,
44+
size: <capped size>,
45+
writeConcern: <document>,
46+
comment: <any>
47+
}
48+
49+
Command Fields
50+
~~~~~~~~~~~~~~
51+
52+
The command takes the following fields:
53+
54+
.. list-table::
55+
:header-rows: 1
56+
:widths: 20 80
57+
58+
* - Field
59+
- Description
60+
61+
* - convertToCapped
62+
- The name of the existing collection to convert.
63+
64+
* - size
65+
- The maximum size, in bytes, for the capped collection.
66+
67+
* - writeConcern
68+
69+
- Optional. A document expressing the :doc:`write concern
70+
</reference/write-concern>` of the :dbcommand:`drop` command.
71+
Omit to use the default write concern.
72+
73+
* - ``comment``
74+
75+
- .. include:: /includes/extracts/comment-content.rst
76+
77+
:dbcommand:`convertToCapped` takes an existing collection
78+
(``<collection>``) and transforms it into a capped collection with
79+
a maximum size in bytes, specified by the ``size`` argument
80+
(``<capped size>``).
81+
82+
During the conversion process, the :dbcommand:`convertToCapped`
83+
command exhibits the following behavior:
84+
85+
- MongoDB traverses the documents in the original collection in
86+
:term:`natural order` and loads the documents into a new
87+
capped collection.
88+
89+
- If the ``capped size`` specified for the capped collection is
90+
smaller than the size of the original uncapped collection, then
91+
MongoDB will overwrite documents in the capped collection based
92+
on insertion order, or *first in, first out* order.
93+
94+
- Internally, to convert the collection, MongoDB uses the following
95+
procedure
96+
97+
- :dbcommand:`cloneCollectionAsCapped` command creates the capped
98+
collection and imports the data.
99+
100+
- MongoDB drops the original collection.
101+
102+
- :dbcommand:`renameCollection` renames the new capped collection
103+
to the name of the original collection.
104+
105+
- .. include:: /includes/fact-database-lock.rst
106+
107+
.. warning::
108+
109+
.. include:: /includes/fact-convertToCapped-indexes.rst
93110

94111
Example
95112
-------

0 commit comments

Comments
 (0)