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
7146221f
Commit
7146221f
authored
May 05, 2016
by
Salvatore Sanfilippo
Browse files
Merge pull request #3133 from c2nes/check-slots-exec
Ensure slots are rechecked on EXEC.
parents
bb5b8d31
e0d0fb45
Changes
1
Show whitespace changes
Inline
Side-by-side
src/redis.c
View file @
7146221f
...
@@ -2185,7 +2185,8 @@ int processCommand(redisClient *c) {
...
@@ -2185,7 +2185,8 @@ int processCommand(redisClient *c) {
!(c->flags & REDIS_MASTER) &&
!(c->flags & REDIS_MASTER) &&
!(c->flags & REDIS_LUA_CLIENT &&
!(c->flags & REDIS_LUA_CLIENT &&
server.lua_caller->flags & REDIS_MASTER) &&
server.lua_caller->flags & REDIS_MASTER) &&
!
(
c
->
cmd
->
getkeys_proc
==
NULL
&&
c
->
cmd
->
firstkey
==
0
))
!(c->cmd->getkeys_proc == NULL && c->cmd->firstkey == 0 &&
c->cmd->proc != execCommand))
{
{
int hashslot;
int hashslot;
...
@@ -2197,7 +2198,11 @@ int processCommand(redisClient *c) {
...
@@ -2197,7 +2198,11 @@ int processCommand(redisClient *c) {
int error_code;
int error_code;
clusterNode *n = getNodeByQuery(c,c->cmd,c->argv,c->argc,&hashslot,&error_code);
clusterNode *n = getNodeByQuery(c,c->cmd,c->argv,c->argc,&hashslot,&error_code);
if (n == NULL || n != server.cluster->myself) {
if (n == NULL || n != server.cluster->myself) {
if (c->cmd->proc == execCommand) {
discardTransaction(c);
} else {
flagTransaction(c);
flagTransaction(c);
}
clusterRedirectClient(c,n,hashslot,error_code);
clusterRedirectClient(c,n,hashslot,error_code);
return REDIS_OK;
return REDIS_OK;
}
}
...
...
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