diff options
author | Bernard Gorman <bernard.gorman@gmail.com> | 2017-09-26 11:46:58 -0400 |
---|---|---|
committer | Bernard Gorman <bernard.gorman@gmail.com> | 2017-09-27 22:12:14 -0400 |
commit | 55637833c707998f685f997d43624c52cde99b45 (patch) | |
tree | bbc00a719c14983e8984d1dbe8dbddd074e023a7 /src/mongo/db/pipeline/document_source_sequential_document_cache.h | |
parent | 22c34669f744ea245c14a64c556d61f8932ceda9 (diff) | |
download | mongo-55637833c707998f685f997d43624c52cde99b45.tar.gz |
SERVER-30871 Permit blocking aggregation stages to run on mongoS if allowDiskUse is false
Diffstat (limited to 'src/mongo/db/pipeline/document_source_sequential_document_cache.h')
-rw-r--r-- | src/mongo/db/pipeline/document_source_sequential_document_cache.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mongo/db/pipeline/document_source_sequential_document_cache.h b/src/mongo/db/pipeline/document_source_sequential_document_cache.h index af96ae8e2ab..1d2474235f2 100644 --- a/src/mongo/db/pipeline/document_source_sequential_document_cache.h +++ b/src/mongo/db/pipeline/document_source_sequential_document_cache.h @@ -50,13 +50,14 @@ public: } StageConstraints constraints() const { - StageConstraints constraints; - - if (_cache->isServing()) { - constraints.requiredPosition = PositionRequirement::kFirst; - constraints.requiresInputDocSource = false; - } - + StageConstraints constraints(StreamType::kStreaming, + _cache->isServing() ? PositionRequirement::kFirst + : PositionRequirement::kNone, + HostTypeRequirement::kNone, + DiskUseRequirement::kNoDiskUse, + FacetRequirement::kNotAllowed); + + constraints.requiresInputDocSource = (_cache->isBuilding()); return constraints; } |