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

Check for views when determining a merging shard during cluster aggregate planning

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Query Execution

    Description

      When determining the merging shard for an aggregation with a $lookup whose 'from' collection is a view, we find that there is no routing table for the view. As a result, we default to merging on the db primary. This ticket tracks the work to handle view resolution when picking a merging shard.

      Note that while a view does not have a routing table entry, the underlying collection does. However, we do not resolve this view to the underlying collection until we issue an aggregate against the inner side (which occurs after we've created a distributed plan and picked a merging shard for the top level aggregate). 

      Note also that this might be tricky to do without tracking views in the sharding catalog.

      Attachments

        Activity

          People

            backlog-query-execution Backlog - Query Execution
            mihai.andrei@mongodb.com Mihai Andrei
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: