summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source.h
diff options
context:
space:
mode:
authorSara Golemon <sara.golemon@mongodb.com>2017-09-11 16:18:13 -0400
committerSara Golemon <sara.golemon@mongodb.com>2017-09-15 15:40:14 -0400
commit7b7de197a787073ecf47f89d1f9976758f24390a (patch)
treea9faefc16ddec51fdf3b84583db187e498ef277a /src/mongo/db/pipeline/document_source.h
parent33908bf59707e36b43ac58b50da4bde3e9cbae84 (diff)
downloadmongo-7b7de197a787073ecf47f89d1f9976758f24390a.tar.gz
SERVER-30166 Support pipelines running on mongos only
Diffstat (limited to 'src/mongo/db/pipeline/document_source.h')
-rw-r--r--src/mongo/db/pipeline/document_source.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/document_source.h b/src/mongo/db/pipeline/document_source.h
index b0793113863..5c10259ce4a 100644
--- a/src/mongo/db/pipeline/document_source.h
+++ b/src/mongo/db/pipeline/document_source.h
@@ -156,6 +156,11 @@ public:
// must also override getModifiedPaths() to provide information about which particular
// $match predicates be swapped before itself.
bool canSwapWithMatch = false;
+
+ // Extends HostTypeRequirement::kAnyShardOrMongos to indicate that a document source
+ // must run on whatever node initially received the pipeline.
+ // This can be a mongod directly, but mongos must not forward to a mongod.
+ bool allowedToForwardFromMongos = true;
};
using HostTypeRequirement = StageConstraints::HostTypeRequirement;