summaryrefslogtreecommitdiff
path: root/src/mongo/db/curop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/curop.cpp')
-rw-r--r--src/mongo/db/curop.cpp23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp
index 556128f6d87..fa13662825f 100644
--- a/src/mongo/db/curop.cpp
+++ b/src/mongo/db/curop.cpp
@@ -462,9 +462,11 @@ bool CurOp::completeAndLogOperation(OperationContext* opCtx,
Lock::GlobalLock lk(opCtx,
MODE_IS,
Date_t::now() + Milliseconds(500),
- Lock::InterruptBehavior::kLeaveUnlocked);
+ Lock::InterruptBehavior::kLeaveUnlocked,
+ true /* skipRSTLLock */);
if (lk.isLocked()) {
- _debug.storageStats = opCtx->recoveryUnit()->getOperationStatistics();
+ _debug.storageStats =
+ opCtx->recoveryUnit()->computeOperationStatisticsSinceLastCall();
} else {
LOGV2_WARNING_OPTIONS(
20525,
@@ -868,7 +870,9 @@ void OpDebug::report(OperationContext* opCtx,
}
if (classicEngineUsed) {
- pAttrs->add("queryExecutionEngine", classicEngineUsed.get() ? "classic" : "sbe");
+ pAttrs->add("queryFramework", classicEngineUsed.value() ? "classic" : "sbe");
+ } else if (cqfUsed) {
+ pAttrs->add("queryFramework", "cqf");
}
if (!errInfo.isOK()) {
@@ -1031,7 +1035,9 @@ void OpDebug::append(OperationContext* opCtx,
}
if (classicEngineUsed) {
- b.append("queryExecutionEngine", classicEngineUsed.get() ? "classic" : "sbe");
+ b.append("queryFramework", classicEngineUsed.value() ? "classic" : "sbe");
+ } else if (cqfUsed) {
+ b.append("queryFramework", "cqf");
}
{
@@ -1307,9 +1313,11 @@ std::function<BSONObj(ProfileFilter::Args)> OpDebug::appendStaged(StringSet requ
}
});
- addIfNeeded("queryExecutionEngine", [](auto field, auto args, auto& b) {
+ addIfNeeded("queryFramework", [](auto field, auto args, auto& b) {
if (args.op.classicEngineUsed) {
- b.append("queryExecutionEngine", args.op.classicEngineUsed.get() ? "classic" : "sbe");
+ b.append("queryFramework", args.op.classicEngineUsed.value() ? "classic" : "sbe");
+ } else if (args.op.cqfUsed) {
+ b.append("queryFramework", "cqf");
}
});
@@ -1475,6 +1483,9 @@ BSONObj OpDebug::makeMongotDebugStatsObject() const {
cursorBuilder.append("timeWaitingMillis", msWaitingForMongot.get());
}
cursorBuilder.append("batchNum", mongotBatchNum);
+ if (!mongotCountVal.isEmpty()) {
+ cursorBuilder.append("resultCount", mongotCountVal);
+ }
return cursorBuilder.obj();
}