From fd01541d77ca1455c603c411f395d6ce34fab6f1 Mon Sep 17 00:00:00 2001 From: Eddie Louie Date: Tue, 1 Aug 2017 20:15:42 -0400 Subject: SERVER-29506 Require $changeNotification to be the first stage. This reverts commit babab967892f81f3107903cb41672503de791998. --- src/mongo/db/pipeline/document_source_mock.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/mongo/db/pipeline/document_source_mock.h') diff --git a/src/mongo/db/pipeline/document_source_mock.h b/src/mongo/db/pipeline/document_source_mock.h index 9236e55ad62..513994cd599 100644 --- a/src/mongo/db/pipeline/document_source_mock.h +++ b/src/mongo/db/pipeline/document_source_mock.h @@ -48,9 +48,15 @@ public: const char* getSourceName() const override; Value serialize( boost::optional explain = boost::none) const override; - InitialSourceType getInitialSourceType() const override { - return InitialSourceType::kInitialSource; + + StageConstraints constraints() const override { + StageConstraints constraints; + constraints.requiredPosition = StageConstraints::PositionRequirement::kFirst; + constraints.requiresInputDocSource = false; + constraints.isAllowedInsideFacetStage = false; + return constraints; } + BSONObjSet getOutputSorts() override { return sorts; } -- cgit v1.2.1