diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2014-06-13 15:35:51 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2014-06-27 22:54:43 -0400 |
commit | 52edab726185cbba1401cb46de221fb3d1cb0408 (patch) | |
tree | 165f9e8fded43db1dac6ab9a1c46cc2367362e5b /src/mongo/db/curop.cpp | |
parent | ecfc44d7bce08660804fa4475b45f9a09d203f09 (diff) | |
download | mongo-52edab726185cbba1401cb46de221fb3d1cb0408.tar.gz |
SERVER-13961 Add OperationContext argument to Client::Context
Time tracking and database access in Client::Context require access to the
OperationContext. Adding it as argument.
This is in preparation for removing LockState from Client.
Diffstat (limited to 'src/mongo/db/curop.cpp')
-rw-r--r-- | src/mongo/db/curop.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp index 178166402d3..2f968ca4979 100644 --- a/src/mongo/db/curop.cpp +++ b/src/mongo/db/curop.cpp @@ -158,12 +158,8 @@ namespace mongo { _dbprofile = std::max( context->_db ? context->_db->getProfilingLevel() : 0 , _dbprofile ); } - void CurOp::recordGlobalTime( long long micros ) const { - if ( _client ) { - const LockState& ls = _client->lockState(); - verify( ls.threadState() ); - Top::global.record( _ns , _op , ls.isWriteLocked() ? 1 : -1 , micros , _isCommand ); - } + void CurOp::recordGlobalTime(bool isWriteLocked, long long micros) const { + Top::global.record(_ns, _op, isWriteLocked ? 1 : -1, micros, _isCommand); } void CurOp::reportState(BSONObjBuilder* builder) { |