From 448471932b8edca334dce2366a96099157a36de0 Mon Sep 17 00:00:00 2001 From: Roman Gershman Date: Thu, 8 May 2025 13:14:51 +0300 Subject: [PATCH] chore: allow skipping cluster probing (#5082) --- src/server/dfly_bench.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/server/dfly_bench.cc b/src/server/dfly_bench.cc index f91ec7a0f..109bdfb9a 100644 --- a/src/server/dfly_bench.cc +++ b/src/server/dfly_bench.cc @@ -65,6 +65,10 @@ ABSL_FLAG(string, P, "", "protocol can be empty (for RESP) or memcache_text"); ABSL_FLAG(bool, tcp_nodelay, false, "If true, set nodelay option on tcp socket"); ABSL_FLAG(bool, noreply, false, "If true, does not wait for replies. Relevant only for memcached."); + +ABSL_FLAG(bool, probe_cluster, true, + "If false, skips cluster-mode probing and works only in single node mode"); + ABSL_FLAG(bool, greet, true, "If true, sends a greeting command on each connection, " "to make sure the connection succeeded"); @@ -1121,7 +1125,7 @@ int main(int argc, char* argv[]) { tcp::endpoint ep{address, GetFlag(FLAGS_p)}; ClusterShards shards; - if (protocol == RESP) { + if (protocol == RESP && GetFlag(FLAGS_probe_cluster)) { shards = proactor->Await([&] { return FetchClusterInfo(ep, proactor); }); } CONSOLE_INFO << "Connecting to "