summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2020-05-05 15:50:00 +0200
committerantirez <antirez@gmail.com>2020-05-05 15:50:00 +0200
commit373a3384acb83e98f9a806b46e1dbb3a43d5f3a5 (patch)
tree9ceac527560ec604fd9057170c555db57394f65a
parent51ab31dbabd925550d2c41f15c53832b4ad8982b (diff)
downloadredis-373a3384acb83e98f9a806b46e1dbb3a43d5f3a5.tar.gz
Don't propagate spurious MULTI on DEBUG LOADAOF.
-rw-r--r--src/multi.c5
-rw-r--r--src/server.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/src/multi.c b/src/multi.c
index cbbd2c513..a331a6240 100644
--- a/src/multi.c
+++ b/src/multi.c
@@ -172,7 +172,10 @@ void execCommand(client *c) {
* This way we'll deliver the MULTI/..../EXEC block as a whole and
* both the AOF and the replication link will have the same consistency
* and atomicity guarantees. */
- if (!must_propagate && !(c->cmd->flags & (CMD_READONLY|CMD_ADMIN))) {
+ if (!must_propagate &&
+ !server.loading &&
+ !(c->cmd->flags & (CMD_READONLY|CMD_ADMIN)))
+ {
execCommandPropagateMulti(c);
must_propagate = 1;
}
diff --git a/src/server.c b/src/server.c
index 416dcd747..e2b4b6f3d 100644
--- a/src/server.c
+++ b/src/server.c
@@ -3204,8 +3204,8 @@ void call(client *c, int flags) {
server.fixed_time_expire++;
- /* Sent the command to clients in MONITOR mode, only if the commands are
- * not generated from reading an AOF. */
+ /* Send the command to clients in MONITOR mode if applicable.
+ * Administrative commands are considered too dangerous to be shown. */
if (listLength(server.monitors) &&
!server.loading &&
!(c->cmd->flags & (CMD_SKIP_MONITOR|CMD_ADMIN)))