You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/change-streams/change-streams.rst
+9-6Lines changed: 9 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,8 @@ Change Streams
9
9
:Status: Accepted
10
10
:Type: Standards
11
11
:Minimum Server Version: 3.6
12
-
:Last Modified:April 23, 2021
13
-
:Version: 1.9.2
12
+
:Last Modified:September 1, 2021
13
+
:Version: 1.9.3
14
14
15
15
.. contents::
16
16
@@ -335,8 +335,8 @@ Driver API
335
335
/**
336
336
* Allowed values: ‘updateLookup’. When set to ‘updateLookup’, the change notification
337
337
* for partial updates will include both a delta describing the changes to the document,
338
-
* as well as a copy of the entire document that was changed from some time after the
339
-
* change occurred. The default is to not send a value.
338
+
* as well as a copy of the entire document that was changed from some time after the
339
+
* change occurred. The default is to not send a value.
340
340
* For forward compatibility, a driver MUST NOT raise an error when a user provides an
341
341
* unknown value. The driver relies on the server to validate this option.
342
342
* @note this is an option of the `$changeStream` pipeline stage.
@@ -506,15 +506,15 @@ Drivers MUST use the ``ns`` returned in the ``aggregate`` command to set the ``c
506
506
ChangeStream
507
507
------------
508
508
509
-
A ``ChangeStream`` is an abstraction of a `TAILABLE_AWAIT <https://github.com/mongodb/specifications/blob/master/source/crud/crud.rst#read>`_ cursor, with support for resumability. Implementors MAY choose to implement a ``ChangeStream`` as an extension of an existing tailable cursor implementation. If the ``ChangeStream`` is implemented as a type which owns a tailable cursor, then the implementor MUST provide a manner of closing the change stream, as well as satisfy the requirements of extending ``Iterable<Document>``. If your language has an idiomatic way of disposing of resources you MAY choose to implement that in addition to, or instead of, an explicit close method.
509
+
A ``ChangeStream`` is an abstraction of a `TAILABLE_AWAIT <https://github.com/mongodb/specifications/blob/master/source/crud/crud.rst#read>`_ cursor, with support for resumability. Implementors MAY choose to implement a ``ChangeStream`` as an extension of an existing tailable cursor implementation. If the ``ChangeStream`` is implemented as a type which owns a tailable cursor, then the implementor MUST provide a manner of closing the change stream, as well as satisfy the requirements of extending ``Iterable<Document>``. If your language has an idiomatic way of disposing of resources you MAY choose to implement that in addition to, or instead of, an explicit close method.
510
510
511
511
A change stream MUST track the last resume token, per `Updating the Cached Resume Token`_.
512
512
513
513
Drivers MUST raise an error on the first document received without a resume token (e.g. the user has removed ``_id`` with a pipeline stage), and close the change stream. The error message SHOULD resemble “Cannot provide resume functionality when the resume token is missing”.
514
514
515
515
A change stream MUST attempt to resume a single time if it encounters any resumable error per `Resumable Error`_. A change stream MUST NOT attempt to resume on any other type of error.
516
516
517
-
In addition to tracking a resume token, change streams MUST also track the read preference specified when the change stream was created. In the event of a resumable error, a change stream MUST perform server selection with the original read preference before attempting to resume.
517
+
In addition to tracking a resume token, change streams MUST also track the read preference specified when the change stream was created. In the event of a resumable error, a change stream MUST perform server selection with the original read preference using the `rules for server selection <https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#rules-for-server-selection>`_ before attempting to resume.
0 commit comments