diff options
Diffstat (limited to 'src/mongo/db/repl/sync_source_feedback.cpp')
-rw-r--r-- | src/mongo/db/repl/sync_source_feedback.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/repl/sync_source_feedback.cpp b/src/mongo/db/repl/sync_source_feedback.cpp index 6773758ef7c..f11e420612a 100644 --- a/src/mongo/db/repl/sync_source_feedback.cpp +++ b/src/mongo/db/repl/sync_source_feedback.cpp @@ -157,7 +157,6 @@ namespace repl { void SyncSourceFeedback::run() { Client::initThread("SyncSourceFeedback"); - OperationContextImpl txn; ReplicationCoordinator* replCoord = getGlobalReplicationCoordinator(); while (true) { // breaks once _shutdownSignaled is true @@ -174,6 +173,7 @@ namespace repl { _positionChanged = false; } + auto txn = cc().getServiceContext()->newOpCtx(); MemberState state = replCoord->getMemberState(); if (state.primary() || state.startup()) { _resetConnection(); @@ -192,14 +192,14 @@ namespace repl { _positionChanged = true; continue; } - if (!_connect(&txn, target)) { + if (!_connect(txn.get(), target)) { sleepmillis(500); boost::unique_lock<boost::mutex> lock(_mtx); _positionChanged = true; continue; } } - Status status = updateUpstream(&txn); + Status status = updateUpstream(txn.get()); if (!status.isOK()) { sleepmillis(500); boost::unique_lock<boost::mutex> lock(_mtx); |