Details
-
Improvement
-
Resolution: Unresolved
-
Major - P3
-
None
-
None
-
None
-
Query Execution
-
Fully Compatible
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.
Attachments
Issue Links
- related to
-
SERVER-24896 Add testing framework to allow testing whether a Document was copied
-
- Backlog
-