diff options
author | Scott Hernandez <scotthernandez@gmail.com> | 2014-02-18 13:54:49 -0500 |
---|---|---|
committer | Scott Hernandez <scotthernandez@gmail.com> | 2014-02-18 17:17:59 -0500 |
commit | 3042939e0f64bbb9076eef3ee1efcdd56fc02050 (patch) | |
tree | c7c16daaecb59dce34707352b7d77284a41706e8 /src/mongo/db/ops/modifier_object_replace.cpp | |
parent | 3a08be3bf2a1a650c97543a448a8ea0c143a89b6 (diff) | |
download | mongo-3042939e0f64bbb9076eef3ee1efcdd56fc02050.tar.gz |
SERVER-12625: skip oplog entries for no-op fields
Diffstat (limited to 'src/mongo/db/ops/modifier_object_replace.cpp')
-rw-r--r-- | src/mongo/db/ops/modifier_object_replace.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mongo/db/ops/modifier_object_replace.cpp b/src/mongo/db/ops/modifier_object_replace.cpp index ffdfa43112d..4748286b9d8 100644 --- a/src/mongo/db/ops/modifier_object_replace.cpp +++ b/src/mongo/db/ops/modifier_object_replace.cpp @@ -179,9 +179,13 @@ namespace mongo { Status status = logBuilder->getReplacementObject(&replacementObject); if (status.isOK()) { - BSONObjIterator it(_val); - while (status.isOK() && it.more()) - status = replacementObject.appendElement(it.next()); + mutablebson::Element current = _preparedState->doc.root().leftChild(); + while (current.ok()) { + status = replacementObject.appendElement(current.getValue()); + if (!status.isOK()) + return status; + current = current.rightSibling(); + } } return status; |