From 0e9d49f4b48a06e504d00638343450a77aebe104 Mon Sep 17 00:00:00 2001 From: Madelyn Olson Date: Mon, 22 Jul 2024 13:42:19 -0700 Subject: [PATCH] Update src/cluster_slot_stats.c Signed-off-by: Madelyn Olson --- src/cluster_slot_stats.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cluster_slot_stats.c b/src/cluster_slot_stats.c index baa3070d72..e8c8b98f8f 100644 --- a/src/cluster_slot_stats.c +++ b/src/cluster_slot_stats.c @@ -144,12 +144,12 @@ void clusterSlotStatResetAll(void) { * would equate to repeating the same calculation twice. */ static int canAddCpuDuration(client *c) { - return server.cluster_slot_stats_enabled && // Config should be enabled. - server.cluster_enabled && // Cluster mode should be enabled. - c->slot != -1 && // Command should be slot specific. - (!server.execution_nesting || // Either; - (server.execution_nesting && // 1) Command should not be nested, or - c->realcmd->flags & CMD_BLOCKING)); // 2) If command is nested, it must be due to unblocking. + return server.cluster_slot_stats_enabled && /* Config should be enabled. */ + server.cluster_enabled && /* Cluster mode should be enabled. */ + c->slot != -1 && /* Command should be slot specific. */ + (!server.execution_nesting || /* Either; */ + (server.execution_nesting && /* 1) Command should not be nested, or */ + c->realcmd->flags & CMD_BLOCKING)); /* 2) If command is nested, it must be due to unblocking. */ } void clusterSlotStatsAddCpuDuration(client *c, ustime_t duration) {