diff options
author | Nathan Myers <nathan.myers@10gen.com> | 2017-09-25 16:20:23 -0400 |
---|---|---|
committer | Nathan Myers <nathan.myers@10gen.com> | 2017-09-25 16:20:23 -0400 |
commit | 0939e1447aa5b4291c09c1fab2344a66098213dd (patch) | |
tree | 53675734d2c5d1378088beb3b35c77cce8ed7a15 /src/mongo/db/update | |
parent | d7aca6435e8ccc89005a97dc585dfbe429a17dec (diff) | |
download | mongo-0939e1447aa5b4291c09c1fab2344a66098213dd.tar.gz |
SERVER-29136 Plumb update document key through to op log
Diffstat (limited to 'src/mongo/db/update')
-rw-r--r-- | src/mongo/db/update/update_driver.cpp | 19 | ||||
-rw-r--r-- | src/mongo/db/update/update_driver.h | 6 |
2 files changed, 0 insertions, 25 deletions
diff --git a/src/mongo/db/update/update_driver.cpp b/src/mongo/db/update/update_driver.cpp index 3c6124e4d8e..cfcc2d891fd 100644 --- a/src/mongo/db/update/update_driver.cpp +++ b/src/mongo/db/update/update_driver.cpp @@ -558,25 +558,6 @@ void UpdateDriver::setCollator(const CollatorInterface* collator) { _modOptions.collator = collator; } -BSONObj UpdateDriver::makeOplogEntryQuery(const BSONObj& doc, bool multi) const { - BSONObjBuilder idPattern; - BSONElement id; - // NOTE: If the matching object lacks an id, we'll log - // with the original pattern. This isn't replay-safe. - // It might make sense to suppress the log instead - // if there's no id. - if (doc.getObjectID(id)) { - idPattern.append(id); - return idPattern.obj(); - } else { - uassert(16980, - str::stream() << "Multi-update operations require all documents to " - "have an '_id' field. " - << doc.toString(), - !multi); - return doc; - } -} void UpdateDriver::clear() { for (vector<ModifierInterface*>::iterator it = _mods.begin(); it != _mods.end(); ++it) { delete *it; diff --git a/src/mongo/db/update/update_driver.h b/src/mongo/db/update/update_driver.h index 823e8eafeeb..3a74b1ca753 100644 --- a/src/mongo/db/update/update_driver.h +++ b/src/mongo/db/update/update_driver.h @@ -98,12 +98,6 @@ public: mutablebson::Document& doc) const; /** - * return a BSONObj with the _id field of the doc passed in, or the doc itself. - * If no _id and multi, error. - */ - BSONObj makeOplogEntryQuery(const BSONObj& doc, bool multi) const; - - /** * Executes the update over 'doc'. If any modifier is positional, use 'matchedField' (index of * the array item matched). If 'doc' allows the modifiers to be applied in place and no index * updating is involved, then the modifiers may be applied "in place" over 'doc'. |