-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Sharding EMEA
-
Fully Compatible
-
Sharding EMEA 2023-10-30, CAR Team 2023-11-13, CAR Team 2023-11-27
-
20
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.
- causes
-
SERVER-85583 Running an aggregate on a view may throw IllegalChangeToExpectedDatabaseVersion
- Closed
-
SERVER-94502 Nesting shard role into router role breaks collection metadata recovery
- Closed