diff options
author | Eric Milkie <milkie@10gen.com> | 2015-11-24 10:06:31 -0500 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2015-11-24 15:13:47 -0500 |
commit | a4424a79434ddddc77e34f3c99acd657e4375890 (patch) | |
tree | 9bd43832682d1ad3bc7d3e3c0409c7f049bc5df3 /src/mongo/db/instance.cpp | |
parent | e8f4a2ea35060e97281221f3b1457ab7106e631e (diff) | |
download | mongo-a4424a79434ddddc77e34f3c99acd657e4375890.tar.gz |
SERVER-21653 do not cache lastoptime decoration from Client object
Diffstat (limited to 'src/mongo/db/instance.cpp')
-rw-r--r-- | src/mongo/db/instance.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mongo/db/instance.cpp b/src/mongo/db/instance.cpp index 3a11fc79e5a..c5acf4fc433 100644 --- a/src/mongo/db/instance.cpp +++ b/src/mongo/db/instance.cpp @@ -650,7 +650,6 @@ void receivedUpdate(OperationContext* txn, const NamespaceString& nsString, Mess int flags = d.pullInt(); BSONObj query = d.nextJsObj(); auto client = txn->getClient(); - auto lastOpHolder = repl::ReplClientInfo::forClient(client); auto lastOpAtOperationStart = repl::ReplClientInfo::forClient(client).getLastOp(); ScopeGuard lastOpSetterGuard = MakeObjGuard(repl::ReplClientInfo::forClient(client), &repl::ReplClientInfo::setLastOpToSystemLastOpTime, @@ -723,7 +722,7 @@ void receivedUpdate(OperationContext* txn, const NamespaceString& nsString, Mess Explain::getSummaryStats(*exec, &summary); collection->infoCache()->notifyOfQuery(txn, summary.indexesUsed); - if (lastOpHolder.getLastOp() != lastOpAtOperationStart) { + 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. @@ -780,7 +779,7 @@ void receivedUpdate(OperationContext* txn, const NamespaceString& nsString, Mess Explain::getSummaryStats(*exec, &summary); collection->infoCache()->notifyOfQuery(txn, summary.indexesUsed); - if (lastOpHolder.getLastOp() != lastOpAtOperationStart) { + 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. @@ -800,7 +799,6 @@ void receivedDelete(OperationContext* txn, const NamespaceString& nsString, Mess BSONObj pattern = d.nextJsObj(); auto client = txn->getClient(); - auto lastOpHolder = repl::ReplClientInfo::forClient(client); auto lastOpAtOperationStart = repl::ReplClientInfo::forClient(client).getLastOp(); ScopeGuard lastOpSetterGuard = MakeObjGuard(repl::ReplClientInfo::forClient(client), &repl::ReplClientInfo::setLastOpToSystemLastOpTime, @@ -854,7 +852,7 @@ void receivedDelete(OperationContext* txn, const NamespaceString& nsString, Mess Explain::getSummaryStats(*exec, &summary); collection->infoCache()->notifyOfQuery(txn, summary.indexesUsed); - if (lastOpHolder.getLastOp() != lastOpAtOperationStart) { + 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. |