mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 02:15:45 +02:00
chore: allow skipping cluster probing
This commit is contained in:
parent
1e40e3aa9b
commit
dabc84ba06
1 changed files with 5 additions and 1 deletions
|
@ -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, 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, 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,
|
ABSL_FLAG(bool, greet, true,
|
||||||
"If true, sends a greeting command on each connection, "
|
"If true, sends a greeting command on each connection, "
|
||||||
"to make sure the connection succeeded");
|
"to make sure the connection succeeded");
|
||||||
|
@ -1121,7 +1125,7 @@ int main(int argc, char* argv[]) {
|
||||||
tcp::endpoint ep{address, GetFlag(FLAGS_p)};
|
tcp::endpoint ep{address, GetFlag(FLAGS_p)};
|
||||||
|
|
||||||
ClusterShards shards;
|
ClusterShards shards;
|
||||||
if (protocol == RESP) {
|
if (protocol == RESP && GetFlag(FLAGS_probe_cluster)) {
|
||||||
shards = proactor->Await([&] { return FetchClusterInfo(ep, proactor); });
|
shards = proactor->Await([&] { return FetchClusterInfo(ep, proactor); });
|
||||||
}
|
}
|
||||||
CONSOLE_INFO << "Connecting to "
|
CONSOLE_INFO << "Connecting to "
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue