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

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

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Aggregation Framework
    • 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

        Activity

          People

            backlog-query-execution Backlog - Query Execution
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: