Skip to content

DOCSP-17414: ChangeStream paradim errors #201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 9, 2021
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
8 changes: 8 additions & 0 deletions source/includes/changestream-paradigm-warning.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. warning::

Using a ``ChangeStream`` in ``EventEmitter`` and ``Iterator`` mode
concurrently is not supported by the driver and causes an error. This
is to prevent undefined behavior, where the driver cannot guarantee
which consumer receives documents first.


5 changes: 1 addition & 4 deletions source/usage-examples/changeStream.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ The ``watch()`` method returns an instance of a :node-api-4.0:`ChangeStream </cl
change streams by iterating over them or listening for events. Select the tab that corresponds to the way you want to
read events from the change stream below.

.. warning::

Avoid mixing both the iterative and event-based approach of reading from change streams as it can cause unexpected
behavior.
.. include:: /includes/changestream-paradigm-warning.rst

.. tabs::

Expand Down