diff options
author | dwight <dwight@10gen.com> | 2012-03-05 15:06:46 -0500 |
---|---|---|
committer | dwight <dwight@10gen.com> | 2012-03-05 15:06:46 -0500 |
commit | 4a802804a6ef8b8afd39b11a1fedf81c93de34b1 (patch) | |
tree | 6275bc77fcc06af19f497d7c4eee79ec32a8b9de /src/mongo/db/curop.cpp | |
parent | 593fd1ce4852464315645d252b11040bc6b413c9 (diff) | |
download | mongo-4a802804a6ef8b8afd39b11a1fedf81c93de34b1.tar.gz |
SERVER-4328 redo currentop test and change how we report locks somewhat in currtentop output
Diffstat (limited to 'src/mongo/db/curop.cpp')
-rw-r--r-- | src/mongo/db/curop.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp index 8b33aa07169..dc2cecd484b 100644 --- a/src/mongo/db/curop.cpp +++ b/src/mongo/db/curop.cpp @@ -26,6 +26,7 @@ namespace mongo { _client(client), _wrapped(wrapped) { + _lockType = 0; if ( _wrapped ) _client->_curOp = this; _start = _checkpoint = 0; @@ -119,8 +120,12 @@ namespace mongo { b.append("opid", _opNum); bool a = _active && _start; b.append("active", a); - if ( _lockType ) - b.append("lockType" , _lockType > 0 ? "write" : "read" ); + if ( _lockType ) { + char str[2]; + str[0] = _lockType; + str[1] = 0; + b.append("lockType" , str); + } b.append("waitingForLock" , _waitingForLock ); if( a ) { |