From 605bcd0f1a26035aae724ed1633432bfd58d3285 Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 5 May 2016 23:37:08 +0200 Subject: [PATCH] Cluster: don't check scripts key slots during AOF loading. --- src/scripting.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/scripting.c b/src/scripting.c index 5791ce8ff..652cf140c 100644 --- a/src/scripting.c +++ b/src/scripting.c @@ -512,8 +512,10 @@ int luaRedisGenericCommand(lua_State *lua, int raise_error) { /* If this is a Redis Cluster node, we need to make sure Lua is not * trying to access non-local keys, with the exception of commands - * received from our master. */ - if (server.cluster_enabled && !(server.lua_caller->flags & CLIENT_MASTER)) { + * received from our master or when loading the AOF back in memory. */ + if (server.cluster_enabled && !server.loading && + !(server.lua_caller->flags & CLIENT_MASTER)) + { /* Duplicate relevant flags in the lua client. */ c->flags &= ~(CLIENT_READONLY|CLIENT_ASKING); c->flags |= server.lua_caller->flags & (CLIENT_READONLY|CLIENT_ASKING);