-
Type: Task
-
Resolution: Won't Do
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Service Arch
`DocumentSourceOut::parseOutSpecAndResolveTargetNamespace()` is a static function that serializes a DatabaseName object into a DocumentSourceOutSpec obj. As a static function, it doesn't have access to the pExpCtx member variable held in a DocumentSourceOut instance to retrieve the `SerializationContext` from, so this will need to be passed in.
The call stack looks like this:
DocumentSourceOut::parseOutSpecAndResolveTargetNamespace DocumentSourceOut::LiteParsed::parse(const NamespaceString& nss, const BSONElement& spec) LiteParsedDocumentSource::parse(const NamespaceString& nss, const BSONElement& spec) LiteParsedPipeline::LiteParsedPipeline(const NamespaceString& nss, const std::vector<BSONObj>& pipelineStages) LiteParsedPipeline::LiteParsedPipeline(const AggregateCommandRequest& request) <-- here we still have access to the agg req PipelineCommand::Invocation::Invocation() PipelineCommand::parseForExplain(...) resolveInvolvedNamespaces() DocumentSourceOut::createFromBson() <-- here we have access to the pExpCtx DocumentSource::registerParser(string name, SimpleParser simpleParser, boost::optional<FeatureFlag> featureFlag) DocumentSource::parse(const intrusive_ptr<ExpressionContext>& expCtx, BSONObj stageObj) runAggregate(...) PipelineCommand::Invocation::run()
Because `LiteParsedPipeline` maintains a map of parsers which fit a specific function signature via `REGISTER_DOCUMENT_SOURCE`, this may affect quite a few call sites. We may want to investigate a way to narrow this scope.
As $out will not be supported by Atlas Proxy, this work will be needed to support mongoq instead.
- related to
-
SERVER-95894 Complete TODO listed in SERVER-77000
- Closed
-
SERVER-96369 Complete TODO listed in SERVER-77000
- Needs Scheduling