-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
None
-
3
-
TBD
-
None
-
None
-
None
-
None
-
None
-
None
-
None
The serialize() methods of DocumentSource subclasses is used for too many purposes (and therefore could be quite complex):
- serializing pipeline stage for logging
- serializing pipeline stage for explain command output
- serializing pipeline stage for cloning or sending over the wire
- serializing pipeline stage for query shape hash computation
Serializing a pipeline stage for explain might include additional information and even query execution statistics (if verbosity >= kExecStats).
Currently, for the explain command we collect explain output for both QO and QE pipeline separately, by calling writeExplainOps() methods, and then we merge the outputs using mergeExplains() method requiring both QO and QE pipeline.
From this prospective, we can already remove QE statistics from the QO serialization methods. We can also refactor explain-relevant parts into separate methods which can enrich the general-purpose serialization results with additional information. Doing this will make it more obvious which information is needed by explain. As a further step, we can modify mergeExplains() method to operate on explain command output from QO and QE pipelines without the need for having both pipelines 'alive' at the same time.
- is related to
-
SERVER-105521 Check where we can delete DocumentSource pipeline once exec::agg::Pipeline is created
-
- Needs Scheduling
-