Add tassert validating constraints for HostTypeRequirement::kCollectionlessSourceRunOnceAnyNode

XMLWordPrintableJSON

    • 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.

            Assignee:
            Daniel Segel
            Reporter:
            Daniel Segel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: