summaryrefslogtreecommitdiff
path: root/src/mongo/db/ops/update.cpp
diff options
context:
space:
mode:
authorJustin Seyster <justin.seyster@mongodb.com>2017-12-14 15:21:10 -0500
committerJustin Seyster <justin.seyster@mongodb.com>2017-12-14 15:37:19 -0500
commit3b116b0dc632a0533c8b76ddbf02186e4bf6774e (patch)
tree2f57de2f0df1acac0e0c9cae85b492b7b8ec3216 /src/mongo/db/ops/update.cpp
parentc0ebce4abf9b0cfd4271767fa062ea2d5b486554 (diff)
downloadmongo-3b116b0dc632a0533c8b76ddbf02186e4bf6774e.tar.gz
SERVER-30854 Remove ModifierInterface update code.
We left the deleted update system in 3.6 to support upgrades from 3.4, but newer versions will always use the new UpdateNode update system. Fun fact: this commit deletes more lines than were inserted by the previous 100 commits.
Diffstat (limited to 'src/mongo/db/ops/update.cpp')
-rw-r--r--src/mongo/db/ops/update.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/mongo/db/ops/update.cpp b/src/mongo/db/ops/update.cpp
index 8c5b31ab53a..2b1b7225513 100644
--- a/src/mongo/db/ops/update.cpp
+++ b/src/mongo/db/ops/update.cpp
@@ -113,8 +113,7 @@ BSONObj applyUpdateOperators(OperationContext* opCtx,
const BSONObj& operators) {
const CollatorInterface* collator = nullptr;
boost::intrusive_ptr<ExpressionContext> expCtx(new ExpressionContext(opCtx, collator));
- UpdateDriver::Options opts(std::move(expCtx));
- UpdateDriver driver(opts);
+ UpdateDriver driver(std::move(expCtx));
std::map<StringData, std::unique_ptr<ExpressionWithPlaceholder>> arrayFilters;
Status status = driver.parse(operators, arrayFilters);
if (!status.isOK()) {
@@ -123,13 +122,9 @@ BSONObj applyUpdateOperators(OperationContext* opCtx,
mutablebson::Document doc(from, mutablebson::Document::kInPlaceDisabled);
- // The original document can be empty because it is only needed for validation of immutable
- // paths.
- const BSONObj emptyOriginal;
const bool validateForStorage = false;
const FieldRefSet emptyImmutablePaths;
- status =
- driver.update(StringData(), emptyOriginal, &doc, validateForStorage, emptyImmutablePaths);
+ status = driver.update(StringData(), &doc, validateForStorage, emptyImmutablePaths);
if (!status.isOK()) {
uasserted(16839, status.reason());
}