summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordi Olivares Provencio <jordi.olivares-provencio@mongodb.com>2022-10-17 13:55:26 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-10-17 14:36:25 +0000
commitcb7a07f7236bdcefb46cc833672ee35728277a11 (patch)
tree372d7a804e29580f6acf0353a7df09c0c0b16661
parenta749c7f391420dc339b3a873568d635dd729630f (diff)
downloadmongo-cb7a07f7236bdcefb46cc833672ee35728277a11.tar.gz
SERVER-70137 Feature flag admission priority in curOp
-rw-r--r--src/mongo/db/SConscript1
-rw-r--r--src/mongo/db/curop.cpp9
2 files changed, 8 insertions, 2 deletions
diff --git a/src/mongo/db/SConscript b/src/mongo/db/SConscript
index 759186c5890..9110fc06a56 100644
--- a/src/mongo/db/SConscript
+++ b/src/mongo/db/SConscript
@@ -200,6 +200,7 @@ env.Library(
'$BUILD_DIR/mongo/db/query/command_request_response',
'$BUILD_DIR/mongo/db/service_context',
'$BUILD_DIR/mongo/db/stats/timer_stats',
+ '$BUILD_DIR/mongo/db/storage/storage_engine_parameters',
'$BUILD_DIR/mongo/rpc/client_metadata',
'$BUILD_DIR/mongo/transport/service_executor',
'$BUILD_DIR/mongo/util/concurrency/admission_context',
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp
index bdc75be159e..c26502502a5 100644
--- a/src/mongo/db/curop.cpp
+++ b/src/mongo/db/curop.cpp
@@ -46,6 +46,7 @@
#include "mongo/db/profile_filter.h"
#include "mongo/db/query/getmore_command_gen.h"
#include "mongo/db/query/plan_summary_stats.h"
+#include "mongo/db/storage/storage_engine_parameters_gen.h"
#include "mongo/logv2/log.h"
#include "mongo/rpc/metadata/client_metadata.h"
#include "mongo/rpc/metadata/impersonated_user_metadata.h"
@@ -695,7 +696,9 @@ void CurOp::reportState(OperationContext* opCtx, BSONObjBuilder* builder, bool t
builder->append("dataThroughputAverage", *_debug.dataThroughputAverage);
}
- builder->append("admissionPriority", toString(opCtx->lockState()->getAdmissionPriority()));
+ if (feature_flags::gFeatureFlagDeprioritizeLowPriorityOperations.isEnabledAndIgnoreFCV()) {
+ builder->append("admissionPriority", toString(opCtx->lockState()->getAdmissionPriority()));
+ }
}
namespace {
@@ -882,7 +885,9 @@ void OpDebug::report(OperationContext* opCtx,
pAttrs->add("reslen", responseLength);
}
- pAttrs->add("admissionPriority", opCtx->lockState()->getAdmissionPriority());
+ if (feature_flags::gFeatureFlagDeprioritizeLowPriorityOperations.isEnabledAndIgnoreFCV()) {
+ pAttrs->add("admissionPriority", opCtx->lockState()->getAdmissionPriority());
+ }
if (lockStats) {
BSONObjBuilder locks;