summaryrefslogtreecommitdiff
path: root/src/mongo/db/curop.cpp
diff options
context:
space:
mode:
authorBen Caimano <ben.caimano@mongodb.com>2019-09-17 13:14:26 +0000
committerevergreen <evergreen@mongodb.com>2019-09-17 13:14:26 +0000
commit149c8f62af00f9dead5d4046368b8a2c3974cfbe (patch)
tree8e6abd648d927172d23fd1eb017ad6dc3ecc6a2a /src/mongo/db/curop.cpp
parent3897a749daab4f9e600af14205eba59775f9b278 (diff)
downloadmongo-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.cpp21
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) {