diff options
author | James Wahlin <james@mongodb.com> | 2018-06-04 13:43:50 -0400 |
---|---|---|
committer | James Wahlin <james@mongodb.com> | 2018-06-11 09:25:31 -0400 |
commit | 1c21898e28a73f1ab81fe1fa3d0e185d4ab916a8 (patch) | |
tree | 9e5588fc17b446c624d5328cb29c2a61a6fadd54 /src/mongo/db/query/query_request.cpp | |
parent | 0dd1fc7ddde2a489558f5328dce5125bddfb9e4d (diff) | |
download | mongo-1c21898e28a73f1ab81fe1fa3d0e185d4ab916a8.tar.gz |
SERVER-35044 Remove maxScan query option
Diffstat (limited to 'src/mongo/db/query/query_request.cpp')
-rw-r--r-- | src/mongo/db/query/query_request.cpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/mongo/db/query/query_request.cpp b/src/mongo/db/query/query_request.cpp index 56ffe5dbb42..5a6225acacb 100644 --- a/src/mongo/db/query/query_request.cpp +++ b/src/mongo/db/query/query_request.cpp @@ -89,7 +89,6 @@ const char kBatchSizeField[] = "batchSize"; const char kNToReturnField[] = "ntoreturn"; const char kSingleBatchField[] = "singleBatch"; const char kCommentField[] = "comment"; -const char kMaxScanField[] = "maxScan"; const char kMaxField[] = "max"; const char kMinField[] = "min"; const char kReturnKeyField[] = "returnKey"; @@ -265,15 +264,6 @@ StatusWith<unique_ptr<QueryRequest>> QueryRequest::parseFromFindCommand(unique_p } qr->_comment = el.str(); - } else if (fieldName == kMaxScanField) { - if (!el.isNumber()) { - str::stream ss; - ss << "Failed to parse: " << cmdObj.toString() << ". " - << "'maxScan' field must be numeric."; - return Status(ErrorCodes::FailedToParse, ss); - } - - qr->_maxScan = el.numberInt(); } else if (fieldName == cmdOptionMaxTimeMS) { StatusWith<int> maxTimeMS = parseMaxTimeMS(el); if (!maxTimeMS.isOK()) { @@ -470,10 +460,6 @@ void QueryRequest::asFindCommand(BSONObjBuilder* cmdBuilder) const { cmdBuilder->append(kCommentField, _comment); } - if (_maxScan > 0) { - cmdBuilder->append(kMaxScanField, _maxScan); - } - if (_maxTimeMS > 0) { cmdBuilder->append(cmdOptionMaxTimeMS, _maxTimeMS); } @@ -611,12 +597,6 @@ Status QueryRequest::validate() const { << *_ntoreturn); } - if (_maxScan < 0) { - return Status(ErrorCodes::BadValue, - str::stream() << "MaxScan value must be non-negative, but received: " - << _maxScan); - } - if (_maxTimeMS < 0) { return Status(ErrorCodes::BadValue, str::stream() << "MaxTimeMS value must be non-negative, but received: " @@ -879,9 +859,6 @@ Status QueryRequest::initFullQuery(const BSONObj& top) { _returnKey = true; addReturnKeyMetaProj(); } - } else if (str::equals("maxScan", name)) { - // Won't throw. - _maxScan = e.numberInt(); } else if (str::equals("showDiskLoc", name)) { // Won't throw. if (e.trueValue()) { @@ -973,10 +950,6 @@ StatusWith<BSONObj> QueryRequest::asAggregationCommand() const { return {ErrorCodes::InvalidPipelineOperator, str::stream() << "Option " << kMaxField << " not supported in aggregation."}; } - if (_maxScan != 0) { - return {ErrorCodes::InvalidPipelineOperator, - str::stream() << "Option " << kMaxScanField << " not supported in aggregation."}; - } if (_returnKey) { return {ErrorCodes::InvalidPipelineOperator, str::stream() << "Option " << kReturnKeyField << " not supported in aggregation."}; |