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/shell/bench.cpp | |
parent | 6ca25c9e65eeb1420a4dce3cba9ae4991d6106e7 (diff) | |
download | mongo-a3158ab422e4d8091203166c5f2601f9bfa0099d.tar.gz |
SERVER-63428 Robustify oplog applying code for update operation
Diffstat (limited to 'src/mongo/shell/bench.cpp')
-rw-r--r-- | src/mongo/shell/bench.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mongo/shell/bench.cpp b/src/mongo/shell/bench.cpp index c2614960c11..3624bbb69bb 100644 --- a/src/mongo/shell/bench.cpp +++ b/src/mongo/shell/bench.cpp @@ -1173,9 +1173,15 @@ void BenchRunOp::executeOnce(DBClientBase* conn, BSONObjBuilder singleUpdate; singleUpdate.append("q", query); switch (this->update.type()) { - case write_ops::UpdateModification::Type::kClassic: { + case write_ops::UpdateModification::Type::kReplacement: { singleUpdate.append("u", - fixQuery(this->update.getUpdateClassic(), + fixQuery(this->update.getUpdateReplacement(), + *state->bsonTemplateEvaluator)); + break; + } + case write_ops::UpdateModification::Type::kModifier: { + singleUpdate.append("u", + fixQuery(this->update.getUpdateModifier(), *state->bsonTemplateEvaluator)); break; } |