summaryrefslogtreecommitdiff
path: root/src/mongo/db/update/document_diff_applier.h
diff options
context:
space:
mode:
authorYuhong Zhang <danielzhangyh@gmail.com>2021-05-25 17:52:15 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-05-27 23:47:49 +0000
commit1674635196330b34d101411da2716c86d99db5c0 (patch)
treefb1ea4bd842ad654510f27fa400094e4af3853bb /src/mongo/db/update/document_diff_applier.h
parentfd1b80f2856cca9292472e6752ce261a886d0817 (diff)
downloadmongo-1674635196330b34d101411da2716c86d99db5c0.tar.gz
SERVER-57159 Generate DamageVector from docDiff with subdocuments in unittest
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,