diff options
Diffstat (limited to 'src/mongo/db/curop.cpp')
-rw-r--r-- | src/mongo/db/curop.cpp | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp index c295d787ea4..429d870f33d 100644 --- a/src/mongo/db/curop.cpp +++ b/src/mongo/db/curop.cpp @@ -385,9 +385,10 @@ void CurOp::setGenericOpRequestDetails(OperationContext* opCtx, void CurOp::setMessage_inlock(StringData message) { if (_progressMeter.isActive()) { LOGV2_ERROR(20527, - "old _message: {message} new message:{message2}", - "message"_attr = redact(_message), - "message2"_attr = redact(message)); + "Changing message from {old} to {new}", + "Updating message", + "old"_attr = redact(_message), + "new"_attr = redact(message)); verify(!_progressMeter.isActive()); } _message = message.toString(); // copy @@ -474,16 +475,22 @@ bool CurOp::completeAndLogOperation(OperationContext* opCtx, if (lk.isLocked()) { _debug.storageStats = opCtx->recoveryUnit()->getOperationStatistics(); } else { - LOGV2_WARNING_OPTIONS(20525, - {component}, - "Unable to gather storage statistics for a slow " - "operation due to lock aquire timeout"); + LOGV2_WARNING_OPTIONS( + 20525, + {component}, + "Failed to gather storage statistics for {opId} due to {reason}", + "Failed to gather storage statistics for slow operation", + "opId"_attr = opCtx->getOpID(), + "reason"_attr = "lock acquire timeout"_sd); } - } catch (const ExceptionForCat<ErrorCategory::Interruption>&) { - LOGV2_WARNING_OPTIONS(20526, - {component}, - "Unable to gather storage statistics for a slow " - "operation due to interrupt"); + } catch (const ExceptionForCat<ErrorCategory::Interruption>& ex) { + LOGV2_WARNING_OPTIONS( + 20526, + {component}, + "Failed to gather storage statistics for {opId} due to {reason}", + "Failed to gather storage statistics for slow operation", + "opId"_attr = opCtx->getOpID(), + "reason"_attr = redact(ex)); } } |