Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-12423

Docs for SERVER-37786: Reject change streams which modify or project-out the resume token



      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.)

            kay.kim@mongodb.com Kay Kim (Inactive)
            kay.kim@mongodb.com Kay Kim (Inactive)
            0 Vote for this issue
            1 Start watching this issue

              4 years, 43 weeks, 3 days ago