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-14 18:06:46 +0000
commit496b02cbf35396ec1571eac3aa66e369bebf4188 (patch)
treef9504c5ace4bfc0a9f1dc4a8948bfab37c4ff7c6
parentc419698b577f7924d2d6fc6bd3f7bd922f1d0dd7 (diff)
downloadmongo-496b02cbf35396ec1571eac3aa66e369bebf4188.tar.gz
SERVER-73721 disable metrics in SessionWorkflow
-rw-r--r--jstests/noPassthrough/slow_session_workflow_log.js23
-rw-r--r--src/mongo/transport/session_workflow.cpp16
2 files changed, 29 insertions, 10 deletions
diff --git a/jstests/noPassthrough/slow_session_workflow_log.js b/jstests/noPassthrough/slow_session_workflow_log.js
index 4a1788a1270..1162f1f99f1 100644
--- a/jstests/noPassthrough/slow_session_workflow_log.js
+++ b/jstests/noPassthrough/slow_session_workflow_log.js
@@ -86,13 +86,18 @@ function runTest(conn) {
assert.eq(slowSessionWorkflowCount, 0);
}
-// 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();
+// TODO(SERVER-63883): re-enable or delete this test depending on resolution
+const testEnabled = false;
+
+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 e5e46a12393..f2bfb8f8b37 100644
--- a/src/mongo/transport/session_workflow.cpp
+++ b/src/mongo/transport/session_workflow.cpp
@@ -256,6 +256,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
/**
@@ -420,7 +434,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. */