-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
Fully Compatible
-
QE 2024-06-10
A constructor that copies DocumentSourceUnionWith accepts ExpCtx for an override:
https://github.com/mongodb/mongo/blob/dbf9b1429b1fbe900472195dd7353cfde835dba3/src/mongo/db/pipeline/document_source_union_with.h#L103
But it doesn't pass it when cloning underlying pipeline:
https://github.com/mongodb/mongo/blob/dbf9b1429b1fbe900472195dd7353cfde835dba3/src/mongo/db/pipeline/document_source_union_with.h#L105
This may lead to inconsistent expCtx between pipeline stage and sub-pipeline.