summaryrefslogtreecommitdiff
path: root/src/mongo/db/update/document_diff_calculator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/update/document_diff_calculator.cpp')
-rw-r--r--src/mongo/db/update/document_diff_calculator.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/update/document_diff_calculator.cpp b/src/mongo/db/update/document_diff_calculator.cpp
index 512087d1a67..35935372241 100644
--- a/src/mongo/db/update/document_diff_calculator.cpp
+++ b/src/mongo/db/update/document_diff_calculator.cpp
@@ -162,8 +162,10 @@ void calculateSubDiffHelper(const BSONElement& preVal,
}
} // namespace
-boost::optional<doc_diff::Diff> computeDiff(const BSONObj& pre, const BSONObj& post) {
- doc_diff::DocumentDiffBuilder diffBuilder;
+boost::optional<doc_diff::Diff> computeDiff(const BSONObj& pre,
+ const BSONObj& post,
+ size_t padding) {
+ doc_diff::DocumentDiffBuilder diffBuilder(padding);
if (computeDocDiff(pre, post, &diffBuilder)) {
auto diff = diffBuilder.serialize();
if (diff.objsize() < post.objsize()) {