[SERVER-24864] Exclusion projection should not make a copy of the input Document. Created: 01/Jul/16  Updated: 06/Dec/22

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

Type: Improvement Priority: Major - P3
Reporter: Charlie Swanson Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-24896 Add testing framework to allow testin... Backlog
Assigned Teams:
Query Execution
Backwards Compatibility: Fully Compatible
Participants:

 Description   

Specifically, this line should use std::move to avoid bumping the reference count, and thus making a copy.

As part of this change, we should consider adding some infrastructure to enable us to test cases like this in the future.

redbeard0531 suggested adding a global callback, which is called each time we make a copy, here. For example, that method could call something like kGlobalDocumentCopyCallBack.copyMade(), and we could use that global struct/class to assert that no copies were made. If we go this route, we should also consider attaching this to the service context.


Generated at Thu Feb 08 04:07:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.