[SERVER-85848] $redact inhibits change stream optimization Created: 29/Jan/24  Updated: 08/Feb/24

Status: In Code Review
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Bernard Gorman Assignee: Romans Kasperovics
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
related to SERVER-86385 Consider making the $redact stage a s... Needs Scheduling
Backport Requested:
v7.0, v6.0
Sprint: QE 2024-02-05, QE 2024-02-19
Participants:

 Description   

The DSCSEnsureResumeTokenPresent and internal DSCSHandleTopologyChange stages are permitted to swap with $match and single-document transformation stages during optimization, to allow user-specified stages to be moved closer to the front of the pipeline, and in particular to allow them to be pushed down to the shards in a cluster deployment. The $redact stage is allowed in a change stream pipeline, but it is not internally implemented or recognised as a single-document transformation; it therefore does not get moved ahead of the change stream stages mentioned above, and does not get pushed down to the shards. This can in turn inhibit any stages after the $redact from being pushed down, which negatively affects performance for $match and $project-like stages, and in the case of the split large events stage will prevent large events from being fragmented on the shards before being sent to mongoS.


Generated at Thu Feb 08 06:58:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.