summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2012-07-09 16:18:13 -0400
committerEliot Horowitz <eliot@10gen.com>2012-07-09 16:18:20 -0400
commit39cb2b8ca7c931496840eafad3c36bc12472e99d (patch)
tree3cef0842bc1abb457f3a8dd1a3995f025f33411a /src
parent9da54325e89514108956ff72099011aa6866a029 (diff)
downloadmongo-39cb2b8ca7c931496840eafad3c36bc12472e99d.tar.gz
fix nestable lock reporting
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/d_concurrency.cpp2
-rwxr-xr-xsrc/mongo/db/lockstate.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/d_concurrency.cpp b/src/mongo/db/d_concurrency.cpp
index 9e114c99d40..a580c710893 100644
--- a/src/mongo/db/d_concurrency.cpp
+++ b/src/mongo/db/d_concurrency.cpp
@@ -202,7 +202,7 @@ namespace mongo {
void reportLockStats(BSONObjBuilder& result) {
BSONObjBuilder b;
b.append(".", qlk.stats.report());
- b.append("admin", nestableLocks[Lock::local]->stats.report());
+ b.append("admin", nestableLocks[Lock::admin]->stats.report());
b.append("local", nestableLocks[Lock::local]->stats.report());
{
mapsf<string,WrapperForRWLock*>::ref r(dblocks);
diff --git a/src/mongo/db/lockstate.cpp b/src/mongo/db/lockstate.cpp
index 0b518df367f..b0ef1f74289 100755
--- a/src/mongo/db/lockstate.cpp
+++ b/src/mongo/db/lockstate.cpp
@@ -216,14 +216,14 @@ namespace mongo {
}
LockStat* LockState::getRelevantLockStat() {
+ if ( _whichNestable )
+ return Lock::nestableLockStat( _whichNestable );
+
if ( _otherLock )
return &_otherLock->stats;
if ( isRW() )
return Lock::globalLockStat();
-
- if ( _whichNestable )
- return Lock::nestableLockStat( _whichNestable );
return 0;
}