-
Type:
Task
-
Resolution: Won't Do
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Integration
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Description: Adds a new module src/mongo/db/commands/query_cmd/involved_namespace_resolution.{cpp,h} exporting one function:
{{boost::optional<ResolvedNamespace> resolveInvolvedNamespaceViaDatabasePrimary(
OperationContext* opCtx, const NamespaceString& requestedNss);}}
For a namespace that does not appear in the local shard's catalog, the helper asks the database primary (via _shardsvrResolveView) to resolve it, returning a ResolvedNamespace carrying the view's default collation, UUID, and the involvedNamespaceIsAView flag. Returns boost::none when sharding is not enabled, resolution fails, or the primary returns no resolvedView payload.
Includes a focused unit test using RouterCatalogCacheTestFixture that intercepts _shardsvrResolveView via onCommand() and exercises the success paths (collection and view replies) plus error paths (NamespaceNotFound, sharding disabled).
Rationale: Factors one self-contained step of shard-side view resolution (SERVER-42282) out of run_aggregate.cpp into a reusable helper with focused test coverage. Keeps the main feature PR narrower and the test for this piece doesn't need to stand up a full sharded cluster.
- is related to
-
SERVER-42282 Consider replacing CommandOnShardedViewNotSupportedOnMongod mechanism with rewrite / routing from shard
-
- Closed
-
- related to
-
SERVER-124462 Add a remote resolved namespaces cache to AggExState
-
- Closed
-