From 1530c0a7dd10f67ff5a1622c107478c6d8275867 Mon Sep 17 00:00:00 2001 From: "zhaozhao.zz" Date: Tue, 11 Dec 2018 19:47:36 +0800 Subject: [PATCH] multi: ignore multiState's cmd_flags when loading AOF --- src/multi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/multi.c b/src/multi.c index c2e64187..5971f465 100644 --- a/src/multi.c +++ b/src/multi.c @@ -144,7 +144,7 @@ void execCommand(client *c) { * was initiated when the instance was a master or a writable replica and * then the configuration changed (for example instance was turned into * a replica). */ - if (server.masterhost && server.repl_slave_ro && + if (!server.loading && server.masterhost && server.repl_slave_ro && !(c->flags & CLIENT_MASTER) && c->mstate.cmd_flags & CMD_WRITE) { addReplyError(c,