summaryrefslogtreecommitdiff
path: root/src/mongo/db/d_concurrency.cpp
diff options
context:
space:
mode:
authorDwight <dwight@10gen.com>2012-04-25 14:49:17 -0400
committerDwight <dwight@10gen.com>2012-04-25 14:49:17 -0400
commit50a2d2cacc5c3233abf573c75bc0c7af9056e642 (patch)
tree39122fac93f55a674dd6464bd02898e168166186 /src/mongo/db/d_concurrency.cpp
parent007d202d65682847e7ba0cc281a7650a5604e069 (diff)
downloadmongo-50a2d2cacc5c3233abf573c75bc0c7af9056e642.tar.gz
the journaling thread upgrades its qlock from R to W when it needs to REMAPPRIVATEVIEW. this upgrade
was not greedy and that was probably a bug. fixed.
Diffstat (limited to 'src/mongo/db/d_concurrency.cpp')
-rw-r--r--src/mongo/db/d_concurrency.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/d_concurrency.cpp b/src/mongo/db/d_concurrency.cpp
index 71dbb2ac4e4..1dcee68fb47 100644
--- a/src/mongo/db/d_concurrency.cpp
+++ b/src/mongo/db/d_concurrency.cpp
@@ -666,6 +666,11 @@ namespace mongo {
bool Lock::GlobalWrite::upgrade() {
verify( !noop );
verify( threadState() == 'R' );
+ if( stoppedGreed ) {
+ // we undo stopgreed here if it were set earlier, as we now want a W lock
+ stoppedGreed = false;
+ q.start_greed();
+ }
if( q.R_to_W() ) {
lockState().changeLockState( 'W' );
return true;