diff --git a/src/scripting.c b/src/scripting.c index a707f1ba..b94627c7 100644 --- a/src/scripting.c +++ b/src/scripting.c @@ -269,6 +269,7 @@ int luaRedisGenericCommand(lua_State *lua, int raise_error) { "Write commands not allowed after non deterministic commands"); goto cleanup; } else if (server.masterhost && server.repl_slave_ro && + !server.loading && !(server.lua_caller->flags & REDIS_MASTER)) { luaPushError(lua, shared.roslaveerr->ptr);