Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Starting in MongoDB 5.1 (and 5.0.4), the :pipeline:`$setWindowFields`
stage cannot be used within :doc:`transactions </core/transactions>`
or with :readconcern:`"snapshot"` read concern.
6 changes: 6 additions & 0 deletions source/reference/operator/aggregation/setWindowFields.txt
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,12 @@ Restrictions

Restrictions for the :pipeline:`$setWindowFields` stage:

- Starting in MongoDB 5.1 (and 5.0.4), the :pipeline:`$setWindowFields`
stage cannot be used:

- Within :doc:`transactions </core/transactions>`.
- With :readconcern:`"snapshot"` read concern.

- :ref:`sortBy <setWindowFields-sortBy>` is required for:

- :ref:`Rank <setWindowFields-rank-operators>` and :ref:`order
Expand Down
5 changes: 5 additions & 0 deletions source/release-notes/5.1-compatibility.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ Removed Parameters
Aggregation
-----------

``$setWindowFields`` Transactions and Snapshot Read Concern
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. include:: /includes/fact-5.1-setWindowFields-snapshot-restriction.rst

Removed Index Types
-------------------

Expand Down