[SERVER-81233] Prevent kickback to router when reading from views on unsplittable collections located on the db-primary Created: 20/Sep/23  Updated: 24/Jan/24  Resolved: 20/Nov/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.3.0-rc0

Type: Task Priority: Major - P3
Reporter: Jordi Serra Torrens Assignee: Jordi Serra Torrens
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
causes SERVER-85583 Running an aggregate on a view may th... Closed
Assigned Teams:
Sharding EMEA
Backwards Compatibility: Fully Compatible
Sprint: Sharding EMEA 2023-10-30, CAR Team 2023-11-13, CAR Team 2023-11-27
Participants:
Linked BF Score: 20

 Description   

When reading from a view, mongos will first target the db-primary shard (where view definitions live). The shard will then resolve the view and either:
a) Execute the read on the underlying collection locally, if the underlying collection is UNSHARDED (i.e. untracked).
b) "kick back" to mongos, so that mongos retargets the read as an aggregation directly on the underlying collection.

We must preserve the optimized path (a) for unsplittable collections that live on the db-primary shard. Currently the optimization is not kept because we only attempt local read when the collection in untracked.



 Comments   
Comment by Githook User [ 20/Nov/23 ]

Author:

{'name': 'Jordi Serra Torrens', 'email': 'jordi.serra-torrens@mongodb.com', 'username': 'jordist'}

Message: SERVER-81233 Prevent kickback to router when reading from views on unsplittable collections located on the db-primary
Branch: master
https://github.com/mongodb/mongo/commit/b22f59b7930d2c44be6b2a7ff5251a210d7e189d

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