Details
-
Task
-
Status: Closed
-
Major - P3
-
Resolution: Fixed
-
None
-
None
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.)
Attachments
Issue Links
- documents
-
SERVER-37786 Reject change streams which modify or project-out the resume token
-
- Closed
-