summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/update.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/exec/update.cpp')
-rw-r--r--src/mongo/db/exec/update.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mongo/db/exec/update.cpp b/src/mongo/db/exec/update.cpp
index 7e8c279c7d1..7533a0b2680 100644
--- a/src/mongo/db/exec/update.cpp
+++ b/src/mongo/db/exec/update.cpp
@@ -165,8 +165,6 @@ UpdateStage::UpdateStage(OperationContext* opCtx,
_updatedRecordIds(params.request->isMulti() ? new RecordIdSet() : NULL),
_doc(params.driver->getDocument()) {
_children.emplace_back(child);
- // We are an update until we fall into the insert case.
- params.driver->setContext(ModifierInterface::ExecInfo::UPDATE_CONTEXT);
// Before we even start executing, we know whether or not this is a replacement
// style or $mod style update.
@@ -378,7 +376,7 @@ Status UpdateStage::applyUpdateOpsForInsert(OperationContext* opCtx,
// oplog record, then. We also set the context of the update driver to the INSERT_CONTEXT.
// Some mods may only work in that context (e.g. $setOnInsert).
driver->setLogOp(false);
- driver->setContext(ModifierInterface::ExecInfo::INSERT_CONTEXT);
+ driver->setInsert(true);
FieldRefSet immutablePaths;
if (!isInternalRequest) {