-
Type:
Sub-task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
DB Integration & Observability
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Expose the host's execution intent to the extension stage parse path, so an extension stage can tell a real execution request apart from analysis-only parsing. This lets the extension $listSearchIndexes counterpart skip the search management-endpoint availability check for analysis-only parsing while still raising it before syntax validation when execution is expected, matching native behavior.
This is done via propagating MongoProcessInterface::isExpectedToExecuteQueries() which returns true when a StubProcessInterface is in use. This information is derived from a valid expression context.
Note, extension stages undergo syntax validation at lite-parse time via parse() which is earlier than that of the built-in stage (does it at DocumentSource creation time). This is before the expression context is built. Thus, it's not immediately clear whether the server can determine execution intent at lite-parse time. If it could then this value could be threaded through to LiteParserOptions.
If not, the value must be provided at a later phase. Providing the execution value at compile-time might be too late. Even it wasn't, when mongos is the receiving host and returns via the explain path, it never builds the exec pipeline which means the ExecAggStage wouldn't be built via compile() and the check would never be executed.
- is related to
-
SERVER-117000 Investigate moving listIndexes check off of the parsing path
-
- Backlog
-