[SERVER-83902] Check for views when determining a merging shard during cluster aggregate planning Created: 05/Dec/23  Updated: 19/Jan/24

Status: Needs Scheduling
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Mihai Andrei Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Execution
Participants:

 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.


Generated at Thu Feb 08 06:53:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.