summaryrefslogtreecommitdiff
path: root/src/mongo/db/update/delta_executor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/update/delta_executor.h')
-rw-r--r--src/mongo/db/update/delta_executor.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/db/update/delta_executor.h b/src/mongo/db/update/delta_executor.h
index d3ba6a9c199..db1ed84a7a6 100644
--- a/src/mongo/db/update/delta_executor.h
+++ b/src/mongo/db/update/delta_executor.h
@@ -46,9 +46,10 @@ public:
/**
* Initializes the executor with the diff to apply.
*/
- explicit DeltaExecutor(doc_diff::Diff diff)
+ explicit DeltaExecutor(doc_diff::Diff diff, bool mustCheckExistenceForInsertOperations)
: _diff(std::move(diff)),
- _outputOplogEntry(update_oplog_entry::makeDeltaOplogEntry(_diff)) {}
+ _outputOplogEntry(update_oplog_entry::makeDeltaOplogEntry(_diff)),
+ _mustCheckExistenceForInsertOperations(mustCheckExistenceForInsertOperations) {}
ApplyResult applyUpdate(ApplyParams applyParams) const final;
@@ -65,6 +66,8 @@ private:
// still needs to produce an oplog entry from the applyUpdate() method so that OpObservers may
// handle the event appropriately.
BSONObj _outputOplogEntry;
+
+ const bool _mustCheckExistenceForInsertOperations;
};
} // namespace mongo