summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/query_request.h
diff options
context:
space:
mode:
authorJames Wahlin <james.wahlin@10gen.com>2017-03-15 17:09:33 -0400
committerJames Wahlin <james.wahlin@10gen.com>2017-04-05 13:51:03 -0400
commitc3341d179db1c36722284676d99cb1c664fb1821 (patch)
treef69c9c00fc8df3ccf6db6df50a78319ff1e38950 /src/mongo/db/query/query_request.h
parent8765acc0fcc6ca3dd7158521ba8d864af4e0f2df (diff)
downloadmongo-c3341d179db1c36722284676d99cb1c664fb1821.tar.gz
SERVER-28040 Fix maxTimeMS/readPref/readConcern for sharded view query
Diffstat (limited to 'src/mongo/db/query/query_request.h')
-rw-r--r--src/mongo/db/query/query_request.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mongo/db/query/query_request.h b/src/mongo/db/query/query_request.h
index 376d5ece98c..a8ca956c43b 100644
--- a/src/mongo/db/query/query_request.h
+++ b/src/mongo/db/query/query_request.h
@@ -250,6 +250,14 @@ public:
_comment = comment;
}
+ const BSONObj& getUnwrappedReadPref() const {
+ return _unwrappedReadPref;
+ }
+
+ void setUnwrappedReadPref(BSONObj unwrappedReadPref) {
+ _unwrappedReadPref = unwrappedReadPref.getOwned();
+ }
+
int getMaxScan() const {
return _maxScan;
}
@@ -449,6 +457,11 @@ private:
// The collation is parsed elsewhere.
BSONObj _collation;
+ // The unwrapped readPreference object, if one was given to us by the mongos command processor.
+ // This object will be empty when no readPreference is specified or if the request does not
+ // originate from mongos.
+ BSONObj _unwrappedReadPref;
+
bool _wantMore = true;
// Must be either unset or positive. Negative skip is illegal and a skip of zero received from
@@ -473,6 +486,8 @@ private:
std::string _comment;
int _maxScan = 0;
+
+ // A user-specified maxTimeMS limit, or a value of '0' if not specified.
int _maxTimeMS = 0;
BSONObj _min;