summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Diener <matt.diener@mongodb.com>2023-02-14 15:26:47 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-02-15 22:34:06 +0000
commite033be9f8cf79152024049885cbd7e492425d03b (patch)
tree9df28007bfcf8fe7704564f4ce1645621be2f8f3
parent5a8a7076ad21c779a2f127df6276cabd5083ea8d (diff)
downloadmongo-e033be9f8cf79152024049885cbd7e492425d03b.tar.gz
SERVER-73721 disable metrics in SessionWorkflow
(cherry picked from commit 496b02cbf35396ec1571eac3aa66e369bebf4188)
-rw-r--r--jstests/noPassthrough/slow_session_workflow_log.js21
-rw-r--r--src/mongo/transport/session_workflow.cpp16
2 files changed, 28 insertions, 9 deletions
diff --git a/jstests/noPassthrough/slow_session_workflow_log.js b/jstests/noPassthrough/slow_session_workflow_log.js
index aa4c131ffd2..960690cea88 100644
--- a/jstests/noPassthrough/slow_session_workflow_log.js
+++ b/jstests/noPassthrough/slow_session_workflow_log.js
@@ -72,13 +72,18 @@ function runTest(conn) {
"The time reported sending a response didn't include the sleep in the failpoint.");
}
-// Test standalone.
-const m = MongoRunner.runMongod();
-runTest(m);
-MongoRunner.stopMongod(m);
+// TODO(SERVER-63883): re-enable or delete this test depending on resolution
+const testEnabled = false;
-// Test sharded.
-const st = new ShardingTest({shards: 1, mongos: 1});
-runTest(st.s0);
-st.stop();
+if (testEnabled) {
+ // Test standalone.
+ const m = MongoRunner.runMongod();
+ runTest(m);
+ MongoRunner.stopMongod(m);
+
+ // Test sharded.
+ const st = new ShardingTest({shards: 1, mongos: 1});
+ runTest(st.s0);
+ st.stop();
+}
})();
diff --git a/src/mongo/transport/session_workflow.cpp b/src/mongo/transport/session_workflow.cpp
index 98b58cf42c8..123bfa16748 100644
--- a/src/mongo/transport/session_workflow.cpp
+++ b/src/mongo/transport/session_workflow.cpp
@@ -251,6 +251,20 @@ private:
ServiceEntryPoint* _sep;
boost::optional<SplitTimer<SplitTimerPolicy>> _t;
};
+
+// TODO(SERVER-63883): Remove when re-introducing real metrics.
+class NoopSessionWorkflowMetrics {
+public:
+ explicit NoopSessionWorkflowMetrics(ServiceEntryPoint*) {}
+ void start() {}
+ void received() {}
+ void processed() {}
+ void sent(Session&) {}
+ void yielded() {}
+ void finish() {}
+};
+
+using Metrics = NoopSessionWorkflowMetrics;
} // namespace metrics_detail
/**
@@ -415,7 +429,7 @@ private:
metrics.finish();
}
- metrics_detail::SessionWorkflowMetrics metrics;
+ metrics_detail::Metrics metrics;
};
/** Alias: refers to this Impl, but holds a ref to the enclosing workflow. */