diff options
author | Benety Goh <benety@mongodb.com> | 2019-03-29 10:59:46 -0400 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2019-03-29 12:24:54 -0400 |
commit | 46d303c2de5529d3158f1fe0afc5bbeef6444dac (patch) | |
tree | c27a0519c6dfa1d441100de4a72b18fff6d8a669 /src/mongo/db/curop.cpp | |
parent | e5d7bb7eaf2b26be77d6011036387bc21debd129 (diff) | |
download | mongo-46d303c2de5529d3158f1fe0afc5bbeef6444dac.tar.gz |
Revert "SERVER-40069 Fix global lock tracking for txns"
This reverts commit d99db775dbf73e27bd20e402f26f068dc199203d.
Diffstat (limited to 'src/mongo/db/curop.cpp')
-rw-r--r-- | src/mongo/db/curop.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp index bd5a1687bf6..cb18faa1337 100644 --- a/src/mongo/db/curop.cpp +++ b/src/mongo/db/curop.cpp @@ -43,6 +43,7 @@ #include "mongo/db/commands.h" #include "mongo/db/commands/server_status_metric.h" #include "mongo/db/concurrency/d_concurrency.h" +#include "mongo/db/concurrency/global_lock_acquisition_tracker.h" #include "mongo/db/concurrency/locker.h" #include "mongo/db/json.h" #include "mongo/db/query/getmore_request.h" @@ -405,7 +406,9 @@ bool CurOp::completeAndLogOperation(OperationContext* opCtx, if (shouldLogOp || (shouldSample && _debug.executionTimeMicros > slowMs * 1000LL)) { auto lockerInfo = opCtx->lockState()->getLockerInfo(_lockStatsBase); - if (_debug.storageStats == nullptr && opCtx->lockState()->wasGlobalLockTaken() && + const GlobalLockAcquisitionTracker& globalLockTracker = + GlobalLockAcquisitionTracker::get(opCtx); + if (_debug.storageStats == nullptr && globalLockTracker.getGlobalLockTaken() && opCtx->getServiceContext()->getStorageEngine()) { // Do not fetch operation statistics again if we have already got them (for instance, // as a part of stashing the transaction). |