summaryrefslogtreecommitdiff
path: root/src/mongo/db/update/document_diff_applier.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/update/document_diff_applier.h')
-rw-r--r--src/mongo/db/update/document_diff_applier.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/db/update/document_diff_applier.h b/src/mongo/db/update/document_diff_applier.h
index 8725035ff78..f9b760dc908 100644
--- a/src/mongo/db/update/document_diff_applier.h
+++ b/src/mongo/db/update/document_diff_applier.h
@@ -61,7 +61,11 @@ ApplyDiffOutput applyDiff(const BSONObj& pre,
bool mustCheckExistenceForInsertOperations);
/**
- * Computes the damage events from the diff to 'pre' and return the damage source and damage vector.
+ * Computes the damage events from the diff for 'pre' and return the pre-image, damage source, and
+ * damage vector. The final, 'mustCheckExistenceForInsertOperations' parameter signals whether we
+ * must check if an inserted field already exists within a (sub)document. This should generally be
+ * set to true, unless the caller has knowledge of the pre-image and the diff, and can guarantee
+ * that we will not re-insert anything.
*/
DamagesOutput computeDamages(const BSONObj& pre,
const Diff& diff,