diff options
author | David Storch <david.storch@10gen.com> | 2015-04-13 13:46:28 -0400 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2015-05-21 17:36:14 -0400 |
commit | 920a48f1ed334efde197cc52c8385ea38c03351e (patch) | |
tree | 18e09c34b668e773dc95d7c7f7367e6b174f1c1a /src/mongo/db/query/getmore_request.h | |
parent | 707654e4bb97b02d9d96697c0d3d5005960f1f92 (diff) | |
download | mongo-920a48f1ed334efde197cc52c8385ea38c03351e.tar.gz |
SERVER-17577 query planner now makes use of separate limit and batchSize fields in find command
Diffstat (limited to 'src/mongo/db/query/getmore_request.h')
-rw-r--r-- | src/mongo/db/query/getmore_request.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mongo/db/query/getmore_request.h b/src/mongo/db/query/getmore_request.h index e7b340dc91a..197125ecfcf 100644 --- a/src/mongo/db/query/getmore_request.h +++ b/src/mongo/db/query/getmore_request.h @@ -28,6 +28,7 @@ #pragma once +#include <boost/optional.hpp> #include <string> #include "mongo/base/status.h" @@ -53,15 +54,16 @@ namespace mongo { const NamespaceString nss; const CursorId cursorid; - const int batchSize; - static const int kDefaultBatchSize; + // The batch size is optional. If not provided, we will put as many documents into the batch + // as fit within the byte limit. + const boost::optional<int> batchSize; private: /** * Construct from parsed BSON */ - GetMoreRequest(const std::string& fullns, CursorId id, int batch); + GetMoreRequest(const std::string& fullns, CursorId id, boost::optional<int> batch); /** * Returns a non-OK status if there are semantic errors in the parsed request |