summaryrefslogtreecommitdiffstats
path: root/src/server.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-04 17:58:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-04 17:58:41 +0000
commit7aaff451bafb4b43e1626b329e59a4c9aa7fc31d (patch)
treeef3363c81916814c65c92fbbfa49f5cb2be77bba /src/server.c
parentAdding debian version 5:7.2.4-1. (diff)
downloadredis-7aaff451bafb4b43e1626b329e59a4c9aa7fc31d.tar.xz
redis-7aaff451bafb4b43e1626b329e59a4c9aa7fc31d.zip
Merging upstream version 5:7.2.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/server.c')
-rw-r--r--src/server.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/server.c b/src/server.c
index 438325f..4d47b5e 100644
--- a/src/server.c
+++ b/src/server.c
@@ -3512,12 +3512,20 @@ void call(client *c, int flags) {
* re-processing and unblock the client.*/
c->flags |= CLIENT_EXECUTING_COMMAND;
+ /* Setting the CLIENT_REPROCESSING_COMMAND flag so that during the actual
+ * processing of the command proc, the client is aware that it is being
+ * re-processed. */
+ if (reprocessing_command) c->flags |= CLIENT_REPROCESSING_COMMAND;
+
monotime monotonic_start = 0;
if (monotonicGetType() == MONOTONIC_CLOCK_HW)
monotonic_start = getMonotonicUs();
c->cmd->proc(c);
+ /* Clear the CLIENT_REPROCESSING_COMMAND flag after the proc is executed. */
+ if (reprocessing_command) c->flags &= ~CLIENT_REPROCESSING_COMMAND;
+
exitExecutionUnit();
/* In case client is blocked after trying to execute the command,
@@ -3575,7 +3583,7 @@ void call(client *c, int flags) {
/* Send the command to clients in MONITOR mode if applicable,
* since some administrative commands are considered too dangerous to be shown.
- * Other exceptions is a client which is unblocked and retring to process the command
+ * Other exceptions is a client which is unblocked and retrying to process the command
* or we are currently in the process of loading AOF. */
if (update_command_stats && !reprocessing_command &&
!(c->cmd->flags & (CMD_SKIP_MONITOR|CMD_ADMIN))) {