diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-01-27 13:01:45 -0500 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-02-11 08:50:52 -0500 |
commit | 6e2d6ae03be6592d95334c43a726cde10247bd24 (patch) | |
tree | d8a2b6191d9589591b292a783a1c306201f2abf3 /src/mongo/db/operation_context_impl.cpp | |
parent | 1c478891a220758259eff7fd6bb1dc0a253a9aa5 (diff) | |
download | mongo-6e2d6ae03be6592d95334c43a726cde10247bd24.tar.gz |
SERVER-17039 Re-add db.currentOp locking stats
This reintroduces the per-operation locking statistics.
Also reverts commit 9b1392162e0f7564cfc3b1634ab78ec1a7f7c871.
Diffstat (limited to 'src/mongo/db/operation_context_impl.cpp')
-rw-r--r-- | src/mongo/db/operation_context_impl.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/operation_context_impl.cpp b/src/mongo/db/operation_context_impl.cpp index be86fb419c8..6d95e494d5d 100644 --- a/src/mongo/db/operation_context_impl.cpp +++ b/src/mongo/db/operation_context_impl.cpp @@ -50,15 +50,17 @@ namespace mongo { OperationContextImpl::OperationContextImpl() : _client(currentClient.get()), _locker(_client->getLocker()) { + invariant(_locker); + StorageEngine* storageEngine = getGlobalEnvironment()->getGlobalStorageEngine(); - invariant(storageEngine); _recovery.reset(storageEngine->newRecoveryUnit()); + _client->setOperationContext(this); } OperationContextImpl::~OperationContextImpl() { - _locker->assertEmpty(); + _locker->assertEmptyAndReset(); _client->resetOperationContext(); } |