[DOCS-12423] Docs for SERVER-37786: Reject change streams which modify or project-out the resume token Created: 04/Feb/19  Updated: 13/Nov/23  Resolved: 20/Jun/19

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: 4.1.8, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Task Priority: Major - P3
Reporter: Kay Kim (Inactive) Assignee: Kay Kim (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-37786 Reject change streams which modify or... Closed
Participants:
Days since reply: 4 years, 33 weeks, 6 days ago
Epic Link: DOCS: 4.2 Server/Tools

 Description   

Description

Description:

As of this commit, any $changeStream pipeline that either removes or modifies the _id field will fail with an exception. This is because the _id field of each $changeStream event contains the resume token for that event; if it is modified or removed, then it becomes impossible to resume the stream from that point.

Engineering Ticket Description:

For example, this pipeline:

db.x.watch([{$replaceRoot: {newRoot: "$fullDocument"}}])

Such a pipeline is incompatible with the drivers protocol, and will fail to resume in the face of a network outage. It is not intended to be supported, so we should ban it to provide a more predictable failure scenario. Now that we have completed SERVER-35904, it shouldn't be very difficult to verify the _id is preserved by the pipeline.

Scope of changes

Impact to Other Docs

MVP (Work and Date)

Resources (Scope or Design Docs, Invision, etc.)



 Comments   
Comment by Githook User [ 20/Jun/19 ]

Author:

{'name': 'Kay Kim', 'email': 'kay.kim@10gen.com', 'username': 'kay-kim'}

Message: DOCS-12423: 4.2 change stream and resume token
Branch: master
https://github.com/mongodb/docs/commit/7dbdb16fe10d89982cdb078c7fcb8ba3bb44416f

Generated at Thu Feb 08 08:05:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.