summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source_facet.cpp
diff options
context:
space:
mode:
authorBernard Gorman <bernard.gorman@gmail.com>2017-09-26 23:23:48 -0400
committerBernard Gorman <bernard.gorman@gmail.com>2017-10-04 10:14:35 +0100
commit939f2bcda18db41b774bbe3cf16e1d4928c58e5d (patch)
tree7b99539bf440a9d76030a07c79b3347792fb5f7d /src/mongo/db/pipeline/document_source_facet.cpp
parent284d80ba6ee928cdf3d8f23c161a7ee1bf4a8faf (diff)
downloadmongo-939f2bcda18db41b774bbe3cf16e1d4928c58e5d.tar.gz
SERVER-29141 Extend StageConstraints to allow kLocalOnly and kMongos host requirements, given pipeline split state
Diffstat (limited to 'src/mongo/db/pipeline/document_source_facet.cpp')
-rw-r--r--src/mongo/db/pipeline/document_source_facet.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/pipeline/document_source_facet.cpp b/src/mongo/db/pipeline/document_source_facet.cpp
index ea98a632787..22cf25af629 100644
--- a/src/mongo/db/pipeline/document_source_facet.cpp
+++ b/src/mongo/db/pipeline/document_source_facet.cpp
@@ -239,7 +239,8 @@ void DocumentSourceFacet::doReattachToOperationContext(OperationContext* opCtx)
}
}
-DocumentSource::StageConstraints DocumentSourceFacet::constraints() const {
+DocumentSource::StageConstraints DocumentSourceFacet::constraints(
+ Pipeline::SplitState pipeState) const {
const bool mayUseDisk = std::any_of(_facets.begin(), _facets.end(), [&](const auto& facet) {
const auto sources = facet.pipeline->getSources();
return std::any_of(sources.begin(), sources.end(), [&](const auto source) {