Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-47338

Add an optional projection to a changestream query

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Query Execution

      At the moment, the changestream definition only allows to specify the fullDocument flag.

      For some use cases, it would be beneficial (to save network bandwidth) to specify the projection, so the client will receive the changes along with the few document's fields instead of receiving the multi-megabyte payload containing the whole document.

      The use case is that in a typical UPDATE scenario, teams only need a few "read-only" fields in addition to the delta to help identify a change that needs to be made in a downstream system.

      However, in some cases, documents can get pretty large because they grow over time (multi-MB is not out of the question). Having to read in a full multi-MB document when all you need is <100 bytes is difficult, puts pressure on the network and memory for no benefit.

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            andrey.brindeyev@mongodb.com Andrey Brindeyev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: