$facet stage should propagate calls to needsPrimaryShard()

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 3.3.14
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • None
    • Fully Compatible
    • ALL
    • Query 2016-09-19
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The $facet stage needs to override DocumentSource::needsPrimaryShard()|https://github.com/mongodb/mongo/blob/r3.3.11/src/mongo/db/pipeline/document_source.h#L221 to forward calls and see if any sub-stage needs the primary shard.

      This can cause $facet stages containing a $lookup to run on a shard that does not have the collection being looked up from (as discovered when running jstests/aggregation/bugs/server19095.js through the passthrough suite from SERVER-25757)

            Assignee:
            Charlie Swanson
            Reporter:
            Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: