summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/find_and_modify_request.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/query/find_and_modify_request.cpp')
-rw-r--r--src/mongo/db/query/find_and_modify_request.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/mongo/db/query/find_and_modify_request.cpp b/src/mongo/db/query/find_and_modify_request.cpp
index c86edcbde5c..703a3621a43 100644
--- a/src/mongo/db/query/find_and_modify_request.cpp
+++ b/src/mongo/db/query/find_and_modify_request.cpp
@@ -168,7 +168,6 @@ StatusWith<FindAndModifyRequest> FindAndModifyRequest::parseFromBSON(NamespaceSt
bool isRemove = false;
bool bypassDocumentValidation = false;
bool arrayFiltersSet = false;
- bool hintSet = false;
std::vector<BSONObj> arrayFilters;
boost::optional<RuntimeConstants> runtimeConstants;
bool writeConcernOptionsSet = false;
@@ -195,7 +194,6 @@ StatusWith<FindAndModifyRequest> FindAndModifyRequest::parseFromBSON(NamespaceSt
sort = sortElement.embeddedObject();
} else if (field == kHintField) {
hint = parseHint(cmdObj[kHintField]);
- hintSet = true;
} else if (field == kRemoveField) {
isRemove = cmdObj[kRemoveField].trueValue();
} else if (field == kUpdateField) {
@@ -287,10 +285,6 @@ StatusWith<FindAndModifyRequest> FindAndModifyRequest::parseFromBSON(NamespaceSt
" 'remove' always returns the deleted document"};
}
- if (hintSet) {
- return {ErrorCodes::FailedToParse, "Cannot specify a hint with remove=true"};
- }
-
if (arrayFiltersSet) {
return {ErrorCodes::FailedToParse, "Cannot specify arrayFilters and remove=true"};
}