[SERVER-47338] Add an optional projection to a changestream query Created: 03/Apr/20  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Andrey Brindeyev Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 0
Labels: qexec-team
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Execution
Participants:
Case:

 Description   

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.


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