diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2014-06-26 11:26:24 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2014-06-26 16:15:51 -0400 |
commit | e1dca2cdeed7cf5549a85d487def752d600af244 (patch) | |
tree | 83de27ed32ae6776cee115e13cfec72e2b2578f4 /src/mongo | |
parent | 9e93c8d95e7b7fb56f8746fd691b514d7957045f (diff) | |
download | mongo-e1dca2cdeed7cf5549a85d487def752d600af244.tar.gz |
SERVER-13961 Remove TLS LockState accesses from repl
Diffstat (limited to 'src/mongo')
-rw-r--r-- | src/mongo/db/repl/sync_tail.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mongo/db/repl/sync_tail.cpp b/src/mongo/db/repl/sync_tail.cpp index ef01eb2b60e..216e4a2e1e7 100644 --- a/src/mongo/db/repl/sync_tail.cpp +++ b/src/mongo/db/repl/sync_tail.cpp @@ -537,8 +537,6 @@ 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(); } } @@ -547,6 +545,11 @@ 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; @@ -555,7 +558,6 @@ namespace repl { it != ops.end(); ++it) { try { - OperationContextImpl txn; if (!st->syncApply(&txn, *it, convertUpdatesToUpserts)) { fassertFailedNoTrace(16359); } |