-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Currently the QE pipeline object is responsible for cascading 'dispose()' call on its stages. As a part of this ticket, we should check if stages can auto-dispose in their destructors by default, independently whether or not the dispose() was called explicitly. Ideally, we could also try to reduce the probability of throwing exceptions in stage destructors or Stage::dispose() overrides (which will be called from the destructors).
More facts about the disposal mechanism (outside of this ticket's scope):
- the stage disposal happens in the reverse order of the stages within the pipeline which might or might not be relevant (if this can be changed it will render SERVER-106743 unnecessary)
- when when Stage::dispose() is called explicitly (not from the stage destructor), the stages are still alive and most methods are still expected to work
- in some cases Stage::dispose() is called explicitly (not from the stage destructor) to force release of resources, so maybe splitting 'cleaning-up' on destruction and (reversibly) forcing release of resources is a good way forward
- is related to
-
SERVER-106743 Decouple Pipeline::dispose() from stitching
-
- Backlog
-
-
SERVER-107304 Make Pipeline::dispose() idempotent
-
- Closed
-
-
SERVER-109522 Dispose stages if execution pipeline is not created due to exception
-
- Closed
-
-
SERVER-107976 Split ExpressionContext class to simplify OperationContext propagation
-
- Needs Scheduling
-