Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
9f4d4eef
Commit
9f4d4eef
authored
Dec 13, 2017
by
antirez
Browse files
Cluster: allow read-only EVAL/EVALSHA in slaves.
Fix #3665.
parent
8eeceabd
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
9f4d4eef
...
@@ -5363,7 +5363,8 @@ clusterNode *getNodeByQuery(client *c, struct redisCommand *cmd, robj **argv, in
...
@@ -5363,7 +5363,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
* node is a slave and the request is about an hash slot our master
* is serving, we can reply without redirection. */
* is serving, we can reply without redirection. */
if (c->flags & CLIENT_READONLY &&
if (c->flags & CLIENT_READONLY &&
cmd->flags & CMD_READONLY &&
(cmd->flags & CMD_READONLY || cmd->proc == evalCommand ||
cmd->proc == evalShaCommand) &&
nodeIsSlave(myself) &&
nodeIsSlave(myself) &&
myself->slaveof == n)
myself->slaveof == n)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment