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

Exclusion projection should not make a copy of the input Document.

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • Labels:
      None
    • Query Execution
    • Fully Compatible

      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.

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: