summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/query_request.h
diff options
context:
space:
mode:
authorMisha Ivkov <misha.ivkov@10gen.com>2019-07-03 18:27:47 -0400
committerMisha Ivkov <misha.ivkov@10gen.com>2019-07-12 16:26:59 -0400
commite6c531c7bc01e628052792a5c94c6da3e5779adf (patch)
tree0c1f32fa0fb7db1b3ccb2235c00f849fbbb660df /src/mongo/db/query/query_request.h
parentdeaf23e643efa664338d602b419589639409b33a (diff)
downloadmongo-e6c531c7bc01e628052792a5c94c6da3e5779adf.tar.gz
SERVER-42077 Add 'allowDiskUse' option to find command
Diffstat (limited to 'src/mongo/db/query/query_request.h')
-rw-r--r--src/mongo/db/query/query_request.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mongo/db/query/query_request.h b/src/mongo/db/query/query_request.h
index ade62c52ddf..7b0cb74dd80 100644
--- a/src/mongo/db/query/query_request.h
+++ b/src/mongo/db/query/query_request.h
@@ -140,6 +140,9 @@ public:
static const std::string metaSortKey;
static const std::string metaTextScore;
+ // Allow using disk during the find command.
+ static const std::string kAllowDiskUseField;
+
const NamespaceString& nss() const {
invariant(!_nss.isEmpty());
return _nss;
@@ -241,6 +244,14 @@ public:
_wantMore = wantMore;
}
+ bool allowDiskUse() const {
+ return _allowDiskUse;
+ }
+
+ void setAllowDiskUse(bool allowDiskUse) {
+ _allowDiskUse = allowDiskUse;
+ }
+
bool isExplain() const {
return _explain;
}
@@ -504,6 +515,8 @@ private:
// allowed.
boost::optional<long long> _batchSize;
+ bool _allowDiskUse = false;
+
// Set only when parsed from an OP_QUERY find message. The value is computed by driver or shell
// and is set to be a min of batchSize and limit provided by user. QR can have set either
// ntoreturn or batchSize / limit.