Details
-
Task
-
Resolution: Fixed
-
Major - P3
-
None
-
None
-
None
-
Sharding EMEA
-
Fully Compatible
-
Sharding EMEA 2023-10-30, CAR Team 2023-11-13, CAR Team 2023-11-27
-
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.
Attachments
Issue Links
- causes
-
SERVER-85583 Running an aggregate on a view may throw IllegalChangeToExpectedDatabaseVersion
-
- Closed
-