summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTyler Brock <tyler.brock@gmail.com>2014-06-27 10:29:12 -0400
committerTyler Brock <tyler.brock@gmail.com>2014-06-27 10:29:12 -0400
commit8ec5d664cbc47578d01ffb07aa31f32544b1a345 (patch)
treee22e35a40e8f22a768db28d72a0f10549ce1c8a4 /src
parent1cc6be662ccd83b0341ef1f31f8f4ad30dc69451 (diff)
downloadmongo-8ec5d664cbc47578d01ffb07aa31f32544b1a345.tar.gz
Revert "SERVER-13961 Remove TLS LockState accesses from repl"
This reverts commit e1dca2cdeed7cf5549a85d487def752d600af244.
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/repl/sync_tail.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mongo/db/repl/sync_tail.cpp b/src/mongo/db/repl/sync_tail.cpp
index 216e4a2e1e7..ef01eb2b60e 100644
--- a/src/mongo/db/repl/sync_tail.cpp
+++ b/src/mongo/db/repl/sync_tail.cpp
@@ -537,6 +537,8 @@ namespace repl {
string threadName = str::stream() << "repl writer worker "
<< replWriterWorkerId.addAndFetch(1);
Client::initThread( threadName.c_str() );
+ // allow us to get through the magic barrier
+ Lock::ParallelBatchWriterMode::iAmABatchParticipant(&cc().lockState());
replLocalAuth();
}
}
@@ -545,11 +547,6 @@ namespace repl {
void multiSyncApply(const std::vector<BSONObj>& ops, SyncTail* st) {
initializeWriterThread();
- OperationContextImpl txn;
-
- // allow us to get through the magic barrier
- Lock::ParallelBatchWriterMode::iAmABatchParticipant(txn.lockState());
-
// convert update operations only for 2.2.1 or greater, because we need guaranteed
// idempotent operations for this to work. See SERVER-6825
bool convertUpdatesToUpserts = theReplSet->oplogVersion > 1 ? true : false;
@@ -558,6 +555,7 @@ namespace repl {
it != ops.end();
++it) {
try {
+ OperationContextImpl txn;
if (!st->syncApply(&txn, *it, convertUpdatesToUpserts)) {
fassertFailedNoTrace(16359);
}