summaryrefslogtreecommitdiff
path: root/src/mongo/db/lockstate.cpp
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2012-08-20 16:43:38 -0400
committerEliot Horowitz <eliot@10gen.com>2012-08-20 16:44:00 -0400
commitcab43568bdd66980bc1aefdbf538cc22c99e6af6 (patch)
treec2cea21c19a7794453930b8af975eb0971ec037b /src/mongo/db/lockstate.cpp
parent11420d16263d482419b45464b44d63c1ca7e1ee6 (diff)
downloadmongo-cab43568bdd66980bc1aefdbf538cc22c99e6af6.tar.gz
SERVER-6793 - parallel writer batch lock needs to be involved in yield/tempRelease
Diffstat (limited to 'src/mongo/db/lockstate.cpp')
-rwxr-xr-xsrc/mongo/db/lockstate.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mongo/db/lockstate.cpp b/src/mongo/db/lockstate.cpp
index b0ef1f74289..291fbd44d5a 100755
--- a/src/mongo/db/lockstate.cpp
+++ b/src/mongo/db/lockstate.cpp
@@ -35,7 +35,8 @@ namespace mongo {
_otherCount(0),
_otherLock(NULL),
_scopedLk(NULL),
- _lockPending(false)
+ _lockPending(false),
+ _lockPendingParallelWriter(false)
{
}
@@ -241,4 +242,13 @@ namespace mongo {
stat->recordAcquireTimeMicros( _ls.threadState(), _lock->acquireFinished( stat ) );
}
+ AcquiringParallelWriter::AcquiringParallelWriter( LockState& ls )
+ : _ls( ls ) {
+ _ls._lockPendingParallelWriter = true;
+ }
+
+ AcquiringParallelWriter::~AcquiringParallelWriter() {
+ _ls._lockPendingParallelWriter = false;
+ }
+
}