summaryrefslogtreecommitdiff
path: root/src/mongo/db/ops/update.cpp
diff options
context:
space:
mode:
authorJudah Schvimer <judah@mongodb.com>2017-07-26 11:43:32 -0400
committerJudah Schvimer <judah@mongodb.com>2017-07-26 11:43:32 -0400
commit50cbe6d35a3b61ce674eb0d8fae173f70f1dddd5 (patch)
tree3ed5b2402f96838b1d92e5881e6f9decfd8478e9 /src/mongo/db/ops/update.cpp
parentee7376eec1c60210e5ec6301bfb65f415d54cc9d (diff)
downloadmongo-50cbe6d35a3b61ce674eb0d8fae173f70f1dddd5.tar.gz
SERVER-27067 Remove unnecessary references to setLastOpToSystemLastOpTime
Diffstat (limited to 'src/mongo/db/ops/update.cpp')
-rw-r--r--src/mongo/db/ops/update.cpp17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/mongo/db/ops/update.cpp b/src/mongo/db/ops/update.cpp
index 575df5d35df..9c661c03925 100644
--- a/src/mongo/db/ops/update.cpp
+++ b/src/mongo/db/ops/update.cpp
@@ -63,20 +63,9 @@ UpdateResult update(OperationContext* opCtx, Database* db, const UpdateRequest&
// Explain should never use this helper.
invariant(!request.isExplain());
- auto client = opCtx->getClient();
- auto lastOpAtOperationStart = repl::ReplClientInfo::forClient(client).getLastOp();
- ScopeGuard lastOpSetterGuard = MakeObjGuard(repl::ReplClientInfo::forClient(client),
- &repl::ReplClientInfo::setLastOpToSystemLastOpTime,
- opCtx);
-
const NamespaceString& nsString = request.getNamespaceString();
Collection* collection = db->getCollection(opCtx, nsString);
- // If this is the local database, don't set last op.
- if (db->name() == "local") {
- lastOpSetterGuard.Dismiss();
- }
-
// The update stage does not create its own collection. As such, if the update is
// an upsert, create the collection that the update stage inserts into beforehand.
if (!collection && request.isUpsert()) {
@@ -113,12 +102,6 @@ UpdateResult update(OperationContext* opCtx, Database* db, const UpdateRequest&
auto exec = uassertStatusOK(getExecutorUpdate(opCtx, nullOpDebug, collection, &parsedUpdate));
uassertStatusOK(exec->executePlan());
- if (repl::ReplClientInfo::forClient(client).getLastOp() != lastOpAtOperationStart) {
- // If this operation has already generated a new lastOp, don't bother setting it here.
- // No-op updates will not generate a new lastOp, so we still need the guard to fire in that
- // case.
- lastOpSetterGuard.Dismiss();
- }
const UpdateStats* updateStats = UpdateStage::getUpdateStats(exec.get());