summaryrefslogtreecommitdiff
path: root/src/mongo/db/curop.cpp
diff options
context:
space:
mode:
authorBen Shteinfeld <ben.shteinfeld@mongodb.com>2022-11-08 21:40:31 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-11-08 22:33:43 +0000
commitbae712c9891ad30c4fa9e1413efa4b3f3aa5c828 (patch)
treeb73222332a3b0de6067b94a3a710a03d1fa827d6 /src/mongo/db/curop.cpp
parent7a45a7307f2aac8389a0cb0a9b805e28686b4874 (diff)
downloadmongo-bae712c9891ad30c4fa9e1413efa4b3f3aa5c828.tar.gz
SERVER-68847 Include query framework information in GetMore profiler entries
Diffstat (limited to 'src/mongo/db/curop.cpp')
-rw-r--r--src/mongo/db/curop.cpp54
1 files changed, 42 insertions, 12 deletions
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp
index 9e6b89c1af4..ea2e0456911 100644
--- a/src/mongo/db/curop.cpp
+++ b/src/mongo/db/curop.cpp
@@ -894,10 +894,20 @@ void OpDebug::report(OperationContext* opCtx,
pAttrs->addDeepCopy("planCacheKey", zeroPaddedHex(*planCacheKey));
}
- if (classicEngineUsed) {
- pAttrs->add("queryFramework", classicEngineUsed.value() ? "classic" : "sbe");
- } else if (cqfUsed) {
- pAttrs->add("queryFramework", "cqf");
+ switch (queryFramework) {
+ case PlanExecutor::QueryFramework::kClassicOnly:
+ case PlanExecutor::QueryFramework::kClassicHybrid:
+ pAttrs->add("queryFramework", "classic");
+ break;
+ case PlanExecutor::QueryFramework::kSBEOnly:
+ case PlanExecutor::QueryFramework::kSBEHybrid:
+ pAttrs->add("queryFramework", "sbe");
+ break;
+ case PlanExecutor::QueryFramework::kCQF:
+ pAttrs->add("queryFramework", "cqf");
+ break;
+ case PlanExecutor::QueryFramework::kUnknown:
+ break;
}
if (!errInfo.isOK()) {
@@ -1070,10 +1080,20 @@ void OpDebug::append(OperationContext* opCtx,
b.append("planCacheKey", zeroPaddedHex(*planCacheKey));
}
- if (classicEngineUsed) {
- b.append("queryFramework", classicEngineUsed.value() ? "classic" : "sbe");
- } else if (cqfUsed) {
- b.append("queryFramework", "cqf");
+ switch (queryFramework) {
+ case PlanExecutor::QueryFramework::kClassicOnly:
+ case PlanExecutor::QueryFramework::kClassicHybrid:
+ b.append("queryFramework", "classic");
+ break;
+ case PlanExecutor::QueryFramework::kSBEOnly:
+ case PlanExecutor::QueryFramework::kSBEHybrid:
+ b.append("queryFramework", "sbe");
+ break;
+ case PlanExecutor::QueryFramework::kCQF:
+ b.append("queryFramework", "cqf");
+ break;
+ case PlanExecutor::QueryFramework::kUnknown:
+ break;
}
{
@@ -1341,10 +1361,20 @@ std::function<BSONObj(ProfileFilter::Args)> OpDebug::appendStaged(StringSet requ
});
addIfNeeded("queryFramework", [](auto field, auto args, auto& b) {
- if (args.op.classicEngineUsed) {
- b.append("queryFramework", args.op.classicEngineUsed.value() ? "classic" : "sbe");
- } else if (args.op.cqfUsed) {
- b.append("queryFramework", "cqf");
+ switch (args.op.queryFramework) {
+ case PlanExecutor::QueryFramework::kClassicOnly:
+ case PlanExecutor::QueryFramework::kClassicHybrid:
+ b.append("queryFramework", "classic");
+ break;
+ case PlanExecutor::QueryFramework::kSBEOnly:
+ case PlanExecutor::QueryFramework::kSBEHybrid:
+ b.append("queryFramework", "sbe");
+ break;
+ case PlanExecutor::QueryFramework::kCQF:
+ b.append("queryFramework", "cqf");
+ break;
+ case PlanExecutor::QueryFramework::kUnknown:
+ break;
}
});