File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -27,14 +27,20 @@ limit only applies to the returned documents. During the pipeline
27
27
processing, the documents may exceed this size. The
28
28
:method:`db.collection.aggregate()` method returns a cursor by default.
29
29
30
+ .. _stage-restrictions:
31
+
30
32
Number of Stages Restrictions
31
33
-----------------------------
32
34
33
35
.. versionchanged:: 5.0
34
36
35
37
MongoDB 5.0 limits the number of :ref:`aggregation pipeline stages
36
38
<aggregation-pipeline-operator-reference>` allowed in a single
37
- pipeline to 1000.
39
+ pipeline to 1000.
40
+
41
+ If an aggregation pipeline exceeds the stage limit before or after being parsed,
42
+ you receive an error.
43
+
38
44
39
45
.. _agg-memory-restrictions:
40
46
Original file line number Diff line number Diff line change @@ -133,6 +133,12 @@ TTL Indexes
133
133
Starting in MongoDB 7.1, you can create :ref:`TTL indexes <index-feature-ttl>`
134
134
on :ref:`capped collections <manual-capped-collection>`.
135
135
136
+ Error Codes for Exceeding Pipeline Size Limit
137
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
138
+
139
+ Starting in MongoDB 7.1, an aggregation command will throw an error when a pipeline
140
+ exceeds the pipeline stage limit. For more details, see :ref:`stage-restrictions`.
141
+
136
142
serverStatus Output Change
137
143
--------------------------
138
144
You can’t perform that action at this time.
0 commit comments