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

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.1.8
    • manual, Server
    • 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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:
                3 years, 23 weeks, 2 days ago