Skip to content

Commit 492c43f

Browse files
authored
Add note about using $changeStreamSplitLargeEvent and update verion (#5572)
* Add note about using $changeStreamSplitLargeEvent and update verion * remove space in link * fix link again * update version style as per Jeff * update version formatting * reverting forced push
1 parent ba94d7a commit 492c43f

File tree

4 files changed

+17
-22
lines changed

4 files changed

+17
-22
lines changed

source/administration/change-streams-production-recommendations.txt

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,19 @@ opened against it, the change stream cursors close when they advance to
1717
that point in the oplog. Change stream cursors with the ``fullDocument :
1818
updateLookup`` option may return ``null`` for the lookup document.
1919

20-
Attempting to resume a change stream against a dropped collection results in
21-
an error. Any data changes that occurred on the collection between the last
22-
event the change stream captured and the collection drop event are lost.
23-
2420
Change stream response documents must adhere to the 16MB BSON document limit.
2521
Depending on the size of documents in the collection against which you open a
2622
change stream, notifications may fail if the resulting notification document
2723
exceeds the 16MB limit. For example, update operations on change streams
2824
configured to return the full updated document, or insert/replace operations
2925
with a document that is at or just below the limit.
3026

27+
.. important::
28+
29+
Starting in version 6.0.9, you can use the
30+
:pipeline:`$changeStreamSplitLargeEvent` aggregation
31+
stage to split the events into smaller fragments.
32+
3133
Replica Sets
3234
------------
3335

@@ -77,14 +79,6 @@ Consider utilizing notification filters for these types of collections.
7779
For example, passing a :pipeline:`$match` pipeline configured to filter
7880
only ``insert`` operations.
7981

80-
For sharded collections, update operations with :ref:`multi : true
81-
<multi-parameter>` may cause any change streams opened against that collection
82-
to send notifications for :term:`orphaned documents <orphaned document>`.
83-
84-
From the moment an unsharded collection is sharded until the time the change
85-
stream catches up to the first chunk migration, the ``documentKey`` in the
86-
change stream notification document only includes the ``_id`` of the document,
87-
not the full shard key.
8882

8983
Indexes and Performance
9084
-----------------------
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Starting in MongoDB 5.3, during :ref:`range migration
22
<range-migration-procedure>`, :ref:`change stream <changeStreams>`
33
events are not generated for updates to :term:`orphaned documents
4-
<orphaned document>`.
4+
<orphaned document>`.

source/reference/command/serverStatus.txt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1884,6 +1884,14 @@ metrics
18841884

18851885
.. versionadded:: 5.1
18861886

1887+
.. serverstatus:: metrics.changeStreams.largeEventsSplit
1888+
1889+
The number of change stream events larger than 16 MB that were split
1890+
into smaller fragments. Events are only split if you use the
1891+
:pipeline:`$changeStreamSplitLargeEvent` pipeline stage.
1892+
1893+
.. versionadded:: 7.0 (*Also available in 6.0.9*)
1894+
18871895
.. serverstatus:: metrics.changeStreams
18881896

18891897
A document that reports information about :ref:`change stream
@@ -1900,13 +1908,6 @@ metrics
19001908

19011909
.. versionadded:: 7.0
19021910

1903-
.. serverstatus:: metrics.changeStreams.largeEventsSplit
1904-
1905-
The number of change stream events larger than 16 MB that were split
1906-
into smaller fragments. Events are only split if you use the
1907-
:pipeline:`$changeStreamSplitLargeEvent` pipeline stage.
1908-
1909-
.. versionadded:: 7.0
19101911

19111912
.. serverstatus:: metrics.changeStreams.showExpandedEvents
19121913

source/reference/operator/aggregation/changeStreamSplitLargeEvent.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ Definition
1313

1414
.. pipeline:: $changeStreamSplitLargeEvent
1515

16-
.. versionadded:: 7.0
16+
.. versionadded:: 7.0 (*Also available in 6.0.9*)
1717

1818
If a :ref:`change stream <changeStreams>` has large events that exceed
1919
16 MB, a ``BSONObjectTooLarge`` exception is returned. Starting in
20-
MongoDB 7.0, you can use a ``$changeStreamSplitLargeEvent`` stage to
20+
MongoDB 6.0.9, you can use a ``$changeStreamSplitLargeEvent`` stage to
2121
split the events into smaller fragments.
2222

2323
You should only use ``$changeStreamSplitLargeEvent`` when strictly

0 commit comments

Comments
 (0)