summaryrefslogtreecommitdiff
path: root/src/mongo/db/ttl.cpp
diff options
context:
space:
mode:
authorAndy Schwerin <schwerin@mongodb.com>2016-04-16 12:24:16 -0400
committerAndy Schwerin <schwerin@mongodb.com>2016-04-18 23:44:56 -0400
commit0ab34aa7b9c3c48ea6cf17888620fca455284d35 (patch)
tree9d592c0427229b53bdea159617f7de5d3c6ff819 /src/mongo/db/ttl.cpp
parentbdc06761206ac398af04f0a2eb482c4dca49bad8 (diff)
downloadmongo-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/ttl.cpp')
-rw-r--r--src/mongo/db/ttl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/ttl.cpp b/src/mongo/db/ttl.cpp
index 9ee42d649a6..108c86d4e0f 100644
--- a/src/mongo/db/ttl.cpp
+++ b/src/mongo/db/ttl.cpp
@@ -48,7 +48,6 @@
#include "mongo/db/db_raii.h"
#include "mongo/db/exec/delete.h"
#include "mongo/db/index/index_descriptor.h"
-#include "mongo/db/operation_context_impl.h"
#include "mongo/db/ops/insert.h"
#include "mongo/db/matcher/extensions_callback_disallow_extensions.h"
#include "mongo/db/namespace_string.h"
@@ -121,7 +120,8 @@ public:
private:
void doTTLPass() {
// Count it as active from the moment the TTL thread wakes up
- OperationContextImpl txn;
+ const ServiceContext::UniqueOperationContext txnPtr = cc().makeOperationContext();
+ OperationContext& txn = *txnPtr;
// if part of replSet but not in a readable state (e.g. during initial sync), skip.
if (repl::getGlobalReplicationCoordinator()->getReplicationMode() ==