diff options
author | Ben Caimano <ben.caimano@mongodb.com> | 2019-09-17 13:14:26 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-09-17 13:14:26 +0000 |
commit | 149c8f62af00f9dead5d4046368b8a2c3974cfbe (patch) | |
tree | 8e6abd648d927172d23fd1eb017ad6dc3ecc6a2a /src/mongo/db/curop.cpp | |
parent | 3897a749daab4f9e600af14205eba59775f9b278 (diff) | |
download | mongo-149c8f62af00f9dead5d4046368b8a2c3974cfbe.tar.gz |
SERVER-42595 Refactor failpoint in curop to fix jstest
Diffstat (limited to 'src/mongo/db/curop.cpp')
-rw-r--r-- | src/mongo/db/curop.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp index 6fcb94b2938..cef1fcd7449 100644 --- a/src/mongo/db/curop.cpp +++ b/src/mongo/db/curop.cpp @@ -48,7 +48,6 @@ #include "mongo/db/prepare_conflict_tracker.h" #include "mongo/db/query/getmore_request.h" #include "mongo/db/query/plan_summary_stats.h" -#include "mongo/platform/mutex.h" #include "mongo/rpc/metadata/client_metadata.h" #include "mongo/rpc/metadata/client_metadata_ismaster.h" #include "mongo/rpc/metadata/impersonated_user_metadata.h" @@ -234,28 +233,12 @@ CurOp* CurOp::get(const OperationContext& opCtx) { return _curopStack(opCtx).top(); } -namespace { - -struct { - Mutex mutex = Mutex("TestMutex"_sd, Seconds(1)); - stdx::unique_lock<Mutex> lock = stdx::unique_lock<Mutex>(mutex, stdx::defer_lock); -} gHangLock; - -} // namespace void CurOp::reportCurrentOpForClient(OperationContext* opCtx, Client* client, bool truncateOps, bool backtraceMode, BSONObjBuilder* infoBuilder) { invariant(client); - if (MONGO_unlikely(keepDiagnosticCaptureOnFailedLock.shouldFail())) { - gHangLock.lock.lock(); - try { - stdx::lock_guard testLock(gHangLock.mutex); - } catch (const DBException& e) { - log() << "Successfully caught " << e; - } - } OperationContext* clientOpCtx = client->getOperationContext(); @@ -336,10 +319,6 @@ void CurOp::reportCurrentOpForClient(OperationContext* opCtx, } } } - - if (MONGO_unlikely(keepDiagnosticCaptureOnFailedLock.shouldFail())) { - gHangLock.lock.unlock(); - } } void CurOp::setGenericCursor_inlock(GenericCursor gc) { |