Skip to content

Commit aba745c

Browse files
committed
DOCS-11604,DOCS-11425, DOCS-11637: system collection restrictions, getMore restrictions, update txn operations pages (part1)
1 parent 75afc39 commit aba745c

39 files changed

+389
-36
lines changed

source/includes/apiargs-dbcommand-aggregate-field.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ arg_name: field
2525
description: |
2626
Specifies to return the information on the processing of the pipeline.
2727
28-
.. versionadded:: 2.6
28+
Not available in :doc:`multi-document transactions </core/transactions>`.
29+
2930
interface: dbcommand
3031
name: explain
3132
operation: aggregate

source/includes/apiargs-dbcommand-delete-field.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ description: |
3737
A document expressing the :doc:`write concern </reference/write-concern>`
3838
of the :dbcommand:`delete` command. Omit to use the default write
3939
concern.
40+
41+
.. include:: /includes/extracts/transactions-operations-write-concern.rst
42+
4043
interface: dbcommand
4144
name: writeConcern
4245
operation: delete

source/includes/apiargs-dbcommand-insert-field.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ description: |
3636
A document that expresses the :doc:`write concern </reference/write-concern>`
3737
of the :dbcommand:`insert` command. Omit to use the default write
3838
concern.
39+
40+
.. include:: /includes/extracts/transactions-operations-write-concern.rst
41+
3942
interface: dbcommand
4043
name: writeConcern
4144
operation: insert

source/includes/apiargs-method-db.collection.aggregate-options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: |
44
Specifies to return the information on the processing of the pipeline. See
55
:ref:`example-aggregate-method-explain-option` for an example.
66
7-
.. versionadded:: 2.6
7+
Not available in :doc:`multi-document transactions </core/transactions>`.
88
optional: true
99
type: boolean
1010
operation: db.collection.aggregate

source/includes/apiargs-method-db.collection.bulkWrite-params.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ description: |
3232
A document expressing the :doc:`write concern
3333
</reference/write-concern>`. Omit to use the default write concern.
3434
35+
.. include:: /includes/extracts/transactions-operations-write-concern.rst
36+
3537
interface: method
3638
name: writeConcern
3739
operation: db.collection.bulkWrite

source/includes/apiargs-method-db.collection.deleteMany-param.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ description: |
1717
A document expressing the :doc:`write concern
1818
</reference/write-concern>`. Omit to use the default write concern.
1919
20+
.. include:: /includes/extracts/transactions-operations-write-concern.rst
21+
2022
interface: method
2123
name: writeConcern
2224
operation: db.collection.deleteMany

source/includes/apiargs-method-db.collection.deleteOne-param.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ description: |
1818
A document expressing the :doc:`write concern
1919
</reference/write-concern>`. Omit to use the default write concern.
2020
21+
.. include:: /includes/extracts/transactions-operations-write-concern.rst
22+
2123
interface: method
2224
name: writeConcern
2325
operation: db.collection.deleteOne

source/includes/apiargs-method-db.collection.findAndModify-param.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ description: |
9999
A document expressing the :doc:`write concern </reference/write-concern>`.
100100
Omit to use the default write concern.
101101
102+
.. include:: /includes/extracts/transactions-operations-write-concern.rst
103+
102104
.. versionadded:: 3.2
103105
interface: method
104106
name: writeConcern

source/includes/apiargs-method-db.collection.insert-param.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ description: |
1616
</reference/write-concern>`. Omit to use the default write concern.
1717
See :ref:`insert-wc`.
1818
19-
.. versionadded:: 2.6
19+
.. include:: /includes/extracts/transactions-operations-write-concern.rst
20+
2021
interface: method
2122
name: writeConcern
2223
operation: db.collection.insert

source/includes/apiargs-method-db.collection.insertMany-param.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ description: |
1313
A document expressing the :doc:`write concern
1414
</reference/write-concern>`. Omit to use the default write concern.
1515
16+
.. include:: /includes/extracts/transactions-operations-write-concern.rst
17+
1618
interface: method
1719
name: writeConcern
1820
operation: db.collection.insertMany

source/includes/apiargs-method-db.collection.insertOne-param.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ description: |
1313
A document expressing the :doc:`write concern
1414
</reference/write-concern>`. Omit to use the default write concern.
1515
16+
.. include:: /includes/extracts/transactions-operations-write-concern.rst
17+
1618
interface: method
1719
name: writeConcern
1820
operation: db.collection.insertOne

source/includes/apiargs-method-db.collection.remove-param.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ description: |
3232
</reference/write-concern>`. Omit to use the default write concern.
3333
See :ref:`remove-wc`.
3434
35-
.. versionadded:: 2.6
35+
.. include:: /includes/extracts/transactions-operations-write-concern.rst
36+
3637
interface: method
3738
name: writeConcern
3839
operation: db.collection.remove

source/includes/apiargs-method-db.collection.replaceOne-param.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ description: |
4444
A document expressing the :doc:`write concern
4545
</reference/write-concern>`. Omit to use the default write concern.
4646
47+
.. include:: /includes/extracts/transactions-operations-write-concern.rst
48+
4749
interface: method
4850
name: writeConcern
4951
operation: db.collection.replaceOne

source/includes/apiargs-method-db.collection.save-param.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ description: |
1414
</reference/write-concern>`. Omit to use the default write concern.
1515
See :ref:`save-wc`.
1616
17-
.. versionadded:: 2.6
17+
.. include:: /includes/extracts/transactions-operations-write-concern.rst
18+
1819
interface: method
1920
name: writeConcern
2021
operation: db.collection.save

source/includes/apiargs-method-db.collection.updateMany-param.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ description: |
4747
A document expressing the :doc:`write concern
4848
</reference/write-concern>`. Omit to use the default write concern.
4949
50+
.. include:: /includes/extracts/transactions-operations-write-concern.rst
51+
5052
interface: method
5153
name: writeConcern
5254
operation: db.collection.updateMany

source/includes/apiargs-method-db.collection.updateOne-param.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ description: |
4747
A document expressing the :doc:`write concern
4848
</reference/write-concern>`. Omit to use the default write concern.
4949
50+
.. include:: /includes/extracts/transactions-operations-write-concern.rst
51+
5052
interface: method
5153
name: writeConcern
5254
operation: db.collection.updateOne

source/reference/command/aggregate.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,27 @@ For more information about the aggregation pipeline
5656
:doc:`/core/aggregation-pipeline`, :doc:`/reference/aggregation`, and
5757
:doc:`/core/aggregation-pipeline-limits`.
5858

59+
Transactions
60+
------------
61+
62+
.. include:: /includes/extracts/transactions-supported-operation.rst
63+
64+
However, the following stages are not allowed within transactions:
65+
66+
- :pipeline:`$collStats`
67+
- :pipeline:`$currentOp`
68+
- :pipeline:`$indexStats`
69+
- :pipeline:`$listLocalSessions`
70+
- :pipeline:`$listSessions`
71+
- :pipeline:`$out`
72+
73+
You also cannot specify the ``explain`` option.
74+
75+
.. include:: /includes/extracts/transactions-usage.rst
76+
77+
.. |operation| replace:: :dbcommand:`aggregate`
78+
79+
5980
Example
6081
-------
6182

source/reference/command/delete.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ Definition
6262
Behavior
6363
--------
6464

65+
Limits
66+
~~~~~~
67+
6568
The total size of all the queries (i.e. the ``q`` field values) in the
6669
``deletes`` array must be less than or equal to the :limit:`maximum
6770
BSON document size <BSON Document Size>`.
@@ -70,6 +73,18 @@ The total number of delete documents in the ``deletes`` array must be
7073
less than or equal to the :limit:`maximum bulk size
7174
<Bulk Operation Size>`.
7275

76+
Transactions
77+
~~~~~~~~~~~~
78+
79+
.. include:: /includes/extracts/transactions-supported-operation.rst
80+
81+
.. include:: /includes/extracts/transactions-operations-write-concern.rst
82+
83+
.. include:: /includes/extracts/transactions-usage.rst
84+
85+
.. |operation| replace:: :dbcommand:`delete`
86+
87+
7388
Examples
7489
--------
7590

source/reference/command/distinct.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,15 @@ Index Use
6363

6464
.. include:: /includes/extracts/fact-distinct-command-index-use.rst
6565

66+
Transactions
67+
~~~~~~~~~~~~
68+
69+
.. include:: /includes/extracts/transactions-supported-operation.rst
70+
71+
.. include:: /includes/extracts/transactions-usage.rst
72+
73+
.. |operation| replace:: :dbcommand:`distinct`
74+
6675
Examples
6776
--------
6877

source/reference/command/find.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,18 @@ Definition
5959

6060
.. include:: /includes/apiargs/dbcommand-find-field.rst
6161

62+
Behavior
63+
--------
64+
65+
Transactions
66+
~~~~~~~~~~~~
67+
68+
.. include:: /includes/extracts/transactions-supported-operation.rst
69+
70+
.. include:: /includes/extracts/transactions-usage.rst
71+
72+
.. |operation| replace:: :dbcommand:`find`
73+
6274
Examples
6375
--------
6476

source/reference/command/findAndModify.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,20 @@ Comparisons with the ``update`` Method
154154

155155
.. include:: /includes/fact-findAndModify-update-comparison.rst
156156

157+
Transactions
158+
~~~~~~~~~~~~
159+
160+
.. include:: /includes/extracts/transactions-supported-operation.rst
161+
162+
If ``upsert: true``, the collection must already exist.
163+
164+
.. include:: /includes/extracts/transactions-operations-write-concern.rst
165+
166+
.. include:: /includes/extracts/transactions-usage.rst
167+
168+
169+
.. |operation| replace:: :dbcommand:`findAndModify`
170+
157171
Examples
158172
--------
159173

source/reference/command/geoSearch.txt

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,25 @@ geoSearch
2525
Behavior
2626
--------
2727

28+
Limit
29+
~~~~~
30+
2831
Unless specified otherwise, the :dbcommand:`geoSearch` command
2932
limits results to 50 documents.
3033

31-
.. important:: :dbcommand:`geoSearch` is not supported for sharded
32-
clusters.
34+
Sharded Clusters
35+
~~~~~~~~~~~~~~~~
36+
37+
:dbcommand:`geoSearch` is not supported for sharded clusters.
38+
39+
Transactions
40+
~~~~~~~~~~~~
41+
42+
.. include:: /includes/extracts/transactions-supported-operation.rst
43+
44+
.. include:: /includes/extracts/transactions-usage.rst
45+
46+
.. |operation| replace:: :dbcommand:`distinct`
3347

3448
Examples
3549
--------

source/reference/command/insert.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,36 @@ Definition
4545
Behavior
4646
--------
4747

48+
Size Limit
49+
~~~~~~~~~~
50+
4851
The total size of all the ``documents`` array elements must be less
4952
than or equal to the :limit:`maximum BSON document size
5053
<BSON Document Size>`.
5154

5255
The total number of documents in the ``documents`` array must be less
5356
than or equal to the :limit:`maximum bulk size <Bulk Operation Size>`.
5457

58+
Document Validation
59+
~~~~~~~~~~~~~~~~~~~
60+
5561
.. include:: /includes/extracts/bypassDocumentValidation-insert.rst
5662

63+
Transactions
64+
~~~~~~~~~~~~
65+
66+
.. include:: /includes/extracts/transactions-supported-operation.rst
67+
68+
The collection must already exist. An insert operation that
69+
would result in the creation of a new collection are not allowed in a
70+
transaction.
71+
72+
.. include:: /includes/extracts/transactions-operations-write-concern.rst
73+
74+
.. include:: /includes/extracts/transactions-usage.rst
75+
76+
.. |operation| replace:: :dbcommand:`insert`
77+
5778
Examples
5879
--------
5980

source/reference/method/db.collection.bulkWrite.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,17 @@ encountered, the number of successful write operations are displayed instead
311311
of the inserted ``_id`` values. Ordered operations display the single error
312312
encountered while unordered operations display each error in an array.
313313

314+
Transactions
315+
~~~~~~~~~~~~
316+
317+
.. include:: /includes/extracts/transactions-supported-operation.rst
318+
319+
For insert and ``upsert: true`` operations, the collection must already
320+
exist.
321+
322+
.. include:: /includes/extracts/transactions-operations-write-concern.rst
323+
324+
.. include:: /includes/extracts/transactions-usage.rst
314325

315326
Examples
316327
--------

source/reference/method/db.collection.deleteMany.txt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Behavior
4646
Capped Collections
4747
~~~~~~~~~~~~~~~~~~
4848

49-
:method:`~db.collection.deleteMany()` throws a ``WriteError`` exception
49+
:method:`db.collection.deleteMany()` throws a ``WriteError`` exception
5050
if used on a :term:`capped collection`. To remove all documents from a capped
5151
collection, use :method:`db.collection.drop()` instead.
5252

@@ -60,6 +60,17 @@ To delete a single document, use :method:`db.collection.deleteOne()` instead.
6060
Alternatively, use a field that is a part of a :term:`unique index` such as
6161
``_id``.
6262

63+
Transactions
64+
~~~~~~~~~~~~
65+
66+
.. include:: /includes/extracts/transactions-supported-operation.rst
67+
68+
.. include:: /includes/extracts/transactions-operations-write-concern.rst
69+
70+
.. include:: /includes/extracts/transactions-usage.rst
71+
72+
.. |operation| replace:: :method:`db.collection.deleteMany()`
73+
6374
Examples
6475
--------
6576

0 commit comments

Comments
 (0)