Cluster: don't check scripts key slots during AOF loading.

This commit is contained in:
antirez 2016-05-05 23:37:08 +02:00
parent 94dc71ff08
commit 2205c465ca

View File

@ -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 /* 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 * trying to access non-local keys, with the exception of commands
* received from our master. */ * received from our master or when loading the AOF back in memory. */
if (server.cluster_enabled && !(server.lua_caller->flags & CLIENT_MASTER)) { if (server.cluster_enabled && !server.loading &&
!(server.lua_caller->flags & CLIENT_MASTER))
{
/* Duplicate relevant flags in the lua client. */ /* Duplicate relevant flags in the lua client. */
c->flags &= ~(CLIENT_READONLY|CLIENT_ASKING); c->flags &= ~(CLIENT_READONLY|CLIENT_ASKING);
c->flags |= server.lua_caller->flags & (CLIENT_READONLY|CLIENT_ASKING); c->flags |= server.lua_caller->flags & (CLIENT_READONLY|CLIENT_ASKING);