diff options
author | Ben Caimano <ben.caimano@mongodb.com> | 2019-09-17 23:22:19 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-09-17 23:22:19 +0000 |
commit | bc11369435ca51e2ff6897433d00f6b909f6a25f (patch) | |
tree | 251653ec8285d798b41846e343e7e414e80ff277 /src/mongo/db/curop.cpp | |
parent | 45aea2495306dd61fab46bd398735bb6aaf7b53a (diff) | |
download | mongo-bc11369435ca51e2ff6897433d00f6b909f6a25f.tar.gz |
SERVER-42165 Replace uses of stdx::mutex with mongo::Mutex
Diffstat (limited to 'src/mongo/db/curop.cpp')
-rw-r--r-- | src/mongo/db/curop.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp index cef1fcd7449..945dbfc9bdb 100644 --- a/src/mongo/db/curop.cpp +++ b/src/mongo/db/curop.cpp @@ -305,12 +305,11 @@ void CurOp::reportCurrentOpForClient(OperationContext* opCtx, CurOp::get(clientOpCtx)->reportState(infoBuilder, truncateOps); } - std::shared_ptr<DiagnosticInfo> diagnostic = DiagnosticInfo::Diagnostic::get(client); - if (diagnostic && backtraceMode) { + if (auto diagnostic = DiagnosticInfo::get(*client)) { BSONObjBuilder waitingForLatchBuilder(infoBuilder->subobjStart("waitingForLatch")); waitingForLatchBuilder.append("timestamp", diagnostic->getTimestamp()); waitingForLatchBuilder.append("captureName", diagnostic->getCaptureName()); - { + if (backtraceMode) { BSONArrayBuilder backtraceBuilder(waitingForLatchBuilder.subarrayStart("backtrace")); for (const auto& frame : diagnostic->makeStackTrace().frames) { BSONObjBuilder backtraceObj(backtraceBuilder.subobjStart()); |