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

$facet stage should propagate calls to needsPrimaryShard()

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

      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@mongodb.com Charlie Swanson
            Reporter:
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: