chore: allow skipping cluster probing

This commit is contained in:
Roman Gershman 2025-05-08 11:42:18 +03:00
parent 1e40e3aa9b
commit dabc84ba06
No known key found for this signature in database
GPG key ID: F25B77EAF8AEBA7A

View file

@ -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 "