Details
Description
MultiPlanStage/SubplanStage/CachedPlanStage are collection-aware stages (they interact with the plan cache, among other things), and they are never used with a non-existent collection. It would simplify the logic in these stages to be able to assume that the collection exists. invariant(collection) should be added to the constructor for these stages, and the header files should be updated as such.