From 5f0ba6a8374eb45f3d5195fa80c9053933d289a0 Mon Sep 17 00:00:00 2001 From: Binbin Date: Sun, 17 Nov 2024 22:54:03 +0800 Subject: [PATCH] update comment and var name Signed-off-by: Binbin --- src/cluster_legacy.c | 2 +- src/debug.c | 4 ++-- src/server.c | 2 +- src/server.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cluster_legacy.c b/src/cluster_legacy.c index fd21bd6849..51a15e7908 100644 --- a/src/cluster_legacy.c +++ b/src/cluster_legacy.c @@ -5002,7 +5002,7 @@ void clusterCron(void) { /* Ping some random node 1 time every 10 iterations, so that we usually ping * one random node every second. */ - if (server.debug_cluster_random_min_ping && !(iteration % 10)) { + if (server.debug_cluster_random_ping && !(iteration % 10)) { int j; /* Check a few random nodes and ping the one with the oldest diff --git a/src/debug.c b/src/debug.c index 80679b1f77..856de34ba4 100644 --- a/src/debug.c +++ b/src/debug.c @@ -437,7 +437,7 @@ void debugCommand(client *c) { " This is valid only when DROP-CLUSTER-PACKET-FILTER is set to a valid packet type.", " When set to 1, the cluster link is closed after dropping a packet based on the filter.", "CLUSTER-RANDOM-MIN-PING <0|1>", - " Enable or disable the cluster random min ping.", + " Send cluster ping to a random node every second. Enabled by default.", "OOM", " Crash the server simulating an out-of-memory error.", "PANIC", @@ -610,7 +610,7 @@ void debugCommand(client *c) { server.debug_cluster_close_link_on_packet_drop = atoi(c->argv[2]->ptr); addReply(c, shared.ok); } else if (!strcasecmp(c->argv[1]->ptr, "cluster-random-min-ping") && c->argc == 3) { - server.debug_cluster_random_min_ping = atoi(c->argv[2]->ptr); + server.debug_cluster_random_ping = atoi(c->argv[2]->ptr); addReply(c, shared.ok); } else if (!strcasecmp(c->argv[1]->ptr, "object") && (c->argc == 3 || c->argc == 4)) { dictEntry *de; diff --git a/src/server.c b/src/server.c index 81969a5f06..2058ddeee7 100644 --- a/src/server.c +++ b/src/server.c @@ -2705,7 +2705,7 @@ void initServer(void) { server.blocking_op_nesting = 0; server.thp_enabled = 0; server.cluster_drop_packet_filter = -1; - server.debug_cluster_random_min_ping = 1; + server.debug_cluster_random_ping = 1; server.reply_buffer_peak_reset_time = REPLY_BUFFER_DEFAULT_PEAK_RESET_TIME; server.reply_buffer_resizing_enabled = 1; server.client_mem_usage_buckets = NULL; diff --git a/src/server.h b/src/server.h index 14afe269d8..66f676f0d9 100644 --- a/src/server.h +++ b/src/server.h @@ -2189,7 +2189,7 @@ struct valkeyServer { int cluster_slot_stats_enabled; /* Cluster slot usage statistics tracking enabled. */ /* Debug config that goes along with cluster_drop_packet_filter. When set, the link is closed on packet drop. */ uint32_t debug_cluster_close_link_on_packet_drop : 1; - uint32_t debug_cluster_random_min_ping : 1; + uint32_t debug_cluster_random_ping : 1; sds cached_cluster_slot_info[CACHE_CONN_TYPE_MAX]; /* Index in array is a bitwise or of CACHE_CONN_TYPE_* */ /* Scripting */ mstime_t busy_reply_threshold; /* Script / module timeout in milliseconds */