-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Execution, Query Optimization
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
Currently document_source.h includes pipeline.h, which is a bit unfortunate for the following reason:
- pipeline.h cannot include document_source.h (otherwise circular include-dependency)
- Pipeline::_sources is std::list<boost::intrusive_ptr<DocumentSource>> declared using forward-declared class DocumentSource.
- It has to be boost::intrusive_ptr, because std::shared_ptr and std::unique_ptr do not accept forward declarations.
- Even with boost::intrusive_ptr you have to do a trick with unique std::unique_ptr with a custom PipelineDeleter to delay the need for a destructor declaration
The preferred solution would be to refactor document_source.h removing its dependency from pipeline.h and include document_source.h into pipeline.h removing the custom deleter and calling Pipeline::dispose() from the destructor.
This improvement ticket is related to SPM-4106, but it is out of the project scope.