diff options
author | Andy Schwerin <schwerin@mongodb.com> | 2016-04-16 12:24:16 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@mongodb.com> | 2016-04-18 23:44:56 -0400 |
commit | 0ab34aa7b9c3c48ea6cf17888620fca455284d35 (patch) | |
tree | 9d592c0427229b53bdea159617f7de5d3c6ff819 /src/mongo/db/clientcursor.cpp | |
parent | bdc06761206ac398af04f0a2eb482c4dca49bad8 (diff) | |
download | mongo-0ab34aa7b9c3c48ea6cf17888620fca455284d35.tar.gz |
SERVER-23779 Replace direct instantiation of OperationContextImpl with cc().makeOperationContext().
Also, make OperationContextImpl's constructor private so that it can
only be constructed via a Client.
Diffstat (limited to 'src/mongo/db/clientcursor.cpp')
-rw-r--r-- | src/mongo/db/clientcursor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/clientcursor.cpp b/src/mongo/db/clientcursor.cpp index 9dab496b5c4..52081f2976b 100644 --- a/src/mongo/db/clientcursor.cpp +++ b/src/mongo/db/clientcursor.cpp @@ -46,7 +46,6 @@ #include "mongo/db/commands/server_status.h" #include "mongo/db/commands/server_status_metric.h" #include "mongo/db/jsobj.h" -#include "mongo/db/operation_context_impl.h" #include "mongo/db/repl/repl_client_info.h" #include "mongo/db/repl/replication_coordinator_global.h" #include "mongo/db/server_parameters.h" @@ -270,7 +269,8 @@ public: const int Secs = 4; while (!inShutdown()) { { - OperationContextImpl txn; + const ServiceContext::UniqueOperationContext txnPtr = cc().makeOperationContext(); + OperationContext& txn = *txnPtr; cursorStatsTimedOut.increment( CursorManager::timeoutCursorsGlobal(&txn, t.millisReset())); } |