-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Overview
Follow-up from SERVER-127954. Extend LiteParsedPipeline::validateMetadataDependencies() coverage to the mongos view-kickback path so the check runs on the original user pipeline in addition to the merged-and-reissued form that shards see.
Background
SERVER-127954 added LiteParsedPipeline::validateMetadataDependencies() in the shard-side aggregation entry point. On mongos, when a query targets a sharded view, the CommandOnShardedViewNotSupportedOnMongod kickback path in buildResolvedViewAggregateRequest (src/mongo/s/query/planner/cluster_aggregate.cpp) constructs a merged pipeline before reissuing to shards. The LP validator on the shard sees the merged form and can miss issues visible only against the pre-splice user pipeline.
Scope of Work
- src/mongo/s/query/planner/cluster_aggregate.cpp — invoke LiteParsedPipeline::validateMetadataDependencies() on the original user LPP before dispatch, mirroring the shard-side check.
- jstests: extend the SERVER-127954 regression tests to run against a sharded fixture.
Acceptance Criteria
- LP metadata-dependency validation runs at the mongos entry point on the original user pipeline.
- No regression in valid sharded view queries.
Technical Notes
Surfaced during the whole-branch review of the SERVER-127954 PR.