diff options
author | Charlie Swanson <cswanson310@gmail.com> | 2016-08-29 10:06:41 -0400 |
---|---|---|
committer | Charlie Swanson <cswanson310@gmail.com> | 2016-09-01 14:08:25 -0400 |
commit | b1014fe1b40a69cd90b27cb336a170317eecc6b7 (patch) | |
tree | c189d2d931cdfbdec83359f08cbb1639c1d5e254 /src/mongo/db/pipeline/document_source_tee_consumer.h | |
parent | d289e240b653e70a7d90be885a3ad6de21b7c6cb (diff) | |
download | mongo-b1014fe1b40a69cd90b27cb336a170317eecc6b7.tar.gz |
SERVER-24153 Allow pipelines within $facet stage to process in batches.
This approach removes the need to buffer all documents in memory, thus
removing concerns about spilling intermediate results to disk.
Diffstat (limited to 'src/mongo/db/pipeline/document_source_tee_consumer.h')
-rw-r--r-- | src/mongo/db/pipeline/document_source_tee_consumer.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/db/pipeline/document_source_tee_consumer.h b/src/mongo/db/pipeline/document_source_tee_consumer.h index 01700b17636..928ac8cba30 100644 --- a/src/mongo/db/pipeline/document_source_tee_consumer.h +++ b/src/mongo/db/pipeline/document_source_tee_consumer.h @@ -50,10 +50,11 @@ class DocumentSourceTeeConsumer : public DocumentSource { public: static boost::intrusive_ptr<DocumentSourceTeeConsumer> create( const boost::intrusive_ptr<ExpressionContext>& expCtx, + size_t facetId, const boost::intrusive_ptr<TeeBuffer>& bufferSource); void dispose() final; - boost::optional<Document> getNext() final; + GetNextResult getNext() final; /** * Returns SEE_NEXT, since it requires no fields, and changes nothing about the documents. @@ -66,10 +67,10 @@ public: private: DocumentSourceTeeConsumer(const boost::intrusive_ptr<ExpressionContext>& expCtx, + size_t facetId, const boost::intrusive_ptr<TeeBuffer>& bufferSource); - bool _initialized = false; + size_t _facetId; boost::intrusive_ptr<TeeBuffer> _bufferSource; - TeeBuffer::const_iterator _iterator; }; } // namespace mongo |