Cluster: allow read-only EVAL/EVALSHA in slaves.

Fix #3665.
This commit is contained in:
antirez 2017-12-13 13:35:59 +01:00
parent 522760fac7
commit de276b6a43

View File

@ -5392,7 +5392,8 @@ clusterNode *getNodeByQuery(client *c, struct redisCommand *cmd, robj **argv, in
* node is a slave and the request is about an hash slot our master
* is serving, we can reply without redirection. */
if (c->flags & CLIENT_READONLY &&
cmd->flags & CMD_READONLY &&
(cmd->flags & CMD_READONLY || cmd->proc == evalCommand ||
cmd->proc == evalShaCommand) &&
nodeIsSlave(myself) &&
myself->slaveof == n)
{