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
2727processing, the documents may exceed this size. The
2828:method:`db.collection.aggregate()` method returns a cursor by default.
2929
30+ .. _stage-restrictions:
31+
3032Number of Stages Restrictions
3133-----------------------------
3234
3335.. versionchanged:: 5.0
3436
3537 MongoDB 5.0 limits the number of :ref:`aggregation pipeline stages
3638 <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+
3844
3945.. _agg-memory-restrictions:
4046
Original file line number Diff line number Diff line change @@ -133,6 +133,12 @@ TTL Indexes
133133Starting in MongoDB 7.1, you can create :ref:`TTL indexes <index-feature-ttl>`
134134on :ref:`capped collections <manual-capped-collection>`.
135135
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+
136142serverStatus Output Change
137143--------------------------
138144
You can’t perform that action at this time.
0 commit comments