Skip to content

Commit f1a45fa

Browse files
authored
DOCSP-23220 Merge cherrypick (#1626)
1 parent 47c0372 commit f1a45fa

34 files changed

+1103
-446
lines changed

snooty.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ toc_landing_pages = [
8888
"/mongo",
8989
"/reference/aggregation",
9090
"/reference/bson-types",
91+
"/reference/change-events",
9192
"/reference/collation",
9293
"/reference/command",
9394
"/reference/command/nav-administration",

source/changeStreams.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,7 @@ upper-right to set the language of the examples on this page.
506506
See :ref:`change-stream-output` for more information on the change stream
507507
response document format.
508508

509+
.. _change-streams-updateLookup:
509510

510511
Lookup Full Document for Update Operations
511512
------------------------------------------
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.. _|idref|-clusterTime:
2+
3+
The timestamp from the oplog entry associated with the event.
4+
5+
Change stream event notifications associated with a
6+
:doc:`multi-document transaction </core/transactions>`
7+
all have the same ``clusterTime`` value: the time when the transaction
8+
was committed.
9+
10+
On sharded clusters, events with the same ``clusterTime`` may not all
11+
relate to the same transaction. Some events don't relate to a
12+
transaction at all.
13+
14+
To identify events for a single transaction, you can use the
15+
combination of ``lsid`` and ``txnNumber`` in the change stream
16+
event document.
17+
18+
.. versionadded:: 4.0
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.. _|idref|-documentKey:
2+
3+
Document that contains the ``_id`` value of the document created or
4+
modified by the :ref:`CRUD <crud>` operation.
5+
6+
For sharded collections, this field also displays the full shard key
7+
for the document. The ``_id`` field is not repeated if it is already a
8+
part of the shard key.
9+
10+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
This field only appears if you configured the change stream with
3+
``fullDocument`` set to ``updateLookup``. When you configure the change stream
4+
with ``updateLookup``, the field represents the current
5+
majority-committed version of the document modified by the update operation.
6+
The document may differ from the changes described in
7+
:ref:`updateDescription <|idref|-updateDescription>` if any other
8+
majority-committed operations have modified the document between the original
9+
update operation and the full document lookup.
10+
11+
For more information, see :ref:`Lookup Full Document for Update Operations
12+
<change-streams-updateLookup>`.
13+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.. _|idref|-fullDocument:
2+
3+
The document created or modified by a :term:`CRUD` operation.

source/includes/change-stream/id.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.. _|idref|-id:
2+
3+
A :term:`BSON` object which serves as an identifier for the
4+
change stream event. This value is used as the ``resumeToken``
5+
for the ``resumeAfter`` parameter when resuming a change stream.
6+
The ``_id`` object has the following form:
7+
8+
.. code-block:: none
9+
10+
{
11+
"_data" : <BinData|hex string>
12+
}
13+
14+
The ``_data`` type depends on the MongoDB versions
15+
and, in some cases, the :ref:`feature compatibility version (FCV)
16+
<view-fcv>` at the time of the change stream's
17+
opening or resumption. See :ref:`change-stream-resume-token` for the
18+
full list of ``_data`` types.
19+
20+
For an example of resuming a change stream by ``resumeToken``, see
21+
:ref:`change-stream-resume`.
22+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.. _|idref|-lsid:
2+
3+
The identifier for the session associated with the transaction.
4+
5+
Only present if the operation is part of a :doc:`multi-document
6+
transaction </core/transactions>`.
7+
8+
.. versionadded:: 4.0
9+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.. _|idref|-ns.coll:
2+
3+
The name of the collection where the event occurred.
4+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.. _|idref|-ns.db:
2+
3+
The name of the database where the event occurred.
4+

0 commit comments

Comments
 (0)