-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
-
None
-
None
-
None
-
None
-
None
-
None
-
None
HostTypeRequirement::kCollectionlessSourceRunOnceAnyNode (formerly kRunOnceAnyNode) has a semantic invariant that should be enforced programmatically: stages using this host type are supposed to provide their own data and be independent of any collection, which means requiresInputDocSource == false and isIndependentOfAnyCollection == true.
There is one exception: the $lookup subpipeline code path hits kCollectionlessSourceRunOnceAnyNode with requiresInputDocSource == true. We should add a tassert in StageConstraints (in the constructor or validation block) that always fires when hostRequirement == kCollectionlessSourceRunOnceAnyNode and confirms that (!requiresInputDocSource && isIndependentOfAnyCollection) or we're in a $lookup subpipeline.
- depends on
-
SERVER-118801 Rename HostTypeRequirement::kRunOnceAnyNode
-
- In Code Review
-