summaryrefslogtreecommitdiff
path: root/src/mongo/db/update
diff options
context:
space:
mode:
authorJordi Olivares Provencio <jordi.olivares-provencio@mongodb.com>2022-09-09 13:08:34 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-09-09 13:39:53 +0000
commitd14bc704d5e758a383093e42225e2f701aab9e4b (patch)
tree59f18cadfdec75bbd2322dac9b6db5412a12adfa /src/mongo/db/update
parentefa5b8e76a4792256d06efd9b87b1f6e28cfd763 (diff)
downloadmongo-d14bc704d5e758a383093e42225e2f701aab9e4b.tar.gz
SERVER-69360 Remove small field optimization
Diffstat (limited to 'src/mongo/db/update')
-rw-r--r--src/mongo/db/update/document_diff_applier.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/mongo/db/update/document_diff_applier.cpp b/src/mongo/db/update/document_diff_applier.cpp
index e9130b670f9..a9349772bcb 100644
--- a/src/mongo/db/update/document_diff_applier.cpp
+++ b/src/mongo/db/update/document_diff_applier.cpp
@@ -40,10 +40,6 @@
namespace mongo::doc_diff {
namespace {
-// Optimizes for time-series documents in the bucket collection. Adds "_id" and "version" fields to
-// merge into fewer damages.
-constexpr int SmallFieldSize = 20;
-
struct Update {
BSONElement newElt;
};
@@ -241,11 +237,6 @@ int32_t computeDamageOnObject(const BSONObj& preImageRoot,
targetOffsetInPostImage(elt.rawdata(), preImageRoot.objdata(), offsetRoot, diffSize);
if (it == tables.fieldMap.end()) {
// Field is not modified.
- auto eltSize = elt.size();
- if (eltSize < SmallFieldSize) {
- appendDamage(damages, bufBuilder->len(), eltSize, targetOffset, eltSize);
- bufBuilder->appendBuf(elt.rawdata(), eltSize);
- }
continue;
}