Skip to content

Commit

Permalink
update comment and var name
Browse files Browse the repository at this point in the history
Signed-off-by: Binbin <[email protected]>
  • Loading branch information
enjoy-binbin committed Nov 17, 2024
1 parent 20473fa commit 5f0ba6a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/cluster_legacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 5f0ba6a

Please sign in to comment.