diff options
author | Rui Liu <rui.liu@mongodb.com> | 2022-02-09 16:42:49 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-02-22 16:30:10 +0000 |
commit | a3158ab422e4d8091203166c5f2601f9bfa0099d (patch) | |
tree | e77ce6c99e6a1077bdcebb9ace2ec1e94c75f50e /src/mongo/db/pipeline | |
parent | 6ca25c9e65eeb1420a4dce3cba9ae4991d6106e7 (diff) | |
download | mongo-a3158ab422e4d8091203166c5f2601f9bfa0099d.tar.gz |
SERVER-63428 Robustify oplog applying code for update operation
Diffstat (limited to 'src/mongo/db/pipeline')
-rw-r--r-- | src/mongo/db/pipeline/document_source_merge.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/pipeline/document_source_merge.cpp b/src/mongo/db/pipeline/document_source_merge.cpp index 0715ac8e65a..80daf31c772 100644 --- a/src/mongo/db/pipeline/document_source_merge.cpp +++ b/src/mongo/db/pipeline/document_source_merge.cpp @@ -136,7 +136,7 @@ MergeStrategy makeInsertStrategy() { // The batch stores replacement style updates, but for this "insert" style of $merge we'd // like to just insert the new document without attempting any sort of replacement. std::transform(batch.begin(), batch.end(), objectsToInsert.begin(), [](const auto& obj) { - return std::get<UpdateModification>(obj).getUpdateClassic(); + return std::get<UpdateModification>(obj).getUpdateReplacement(); }); uassertStatusOK(expCtx->mongoProcessInterface->insert( expCtx, ns, std::move(objectsToInsert), wc, epoch)); @@ -151,7 +151,7 @@ BatchTransform makeUpdateTransform(const std::string& updateOp) { return [updateOp](auto& batch) { for (auto&& obj : batch) { std::get<UpdateModification>(obj) = UpdateModification::parseFromClassicUpdate( - BSON(updateOp << std::get<UpdateModification>(obj).getUpdateClassic())); + BSON(updateOp << std::get<UpdateModification>(obj).getUpdateReplacement())); } }; } |