mirror of
https://github.com/fluencelabs/redis
synced 2025-07-30 16:01:57 +00:00
Merge pull request #3133 from c2nes/check-slots-exec
Ensure slots are rechecked on EXEC.
This commit is contained in:
@@ -2185,7 +2185,8 @@ int processCommand(redisClient *c) {
|
||||
!(c->flags & REDIS_MASTER) &&
|
||||
!(c->flags & REDIS_LUA_CLIENT &&
|
||||
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;
|
||||
|
||||
@@ -2197,7 +2198,11 @@ int processCommand(redisClient *c) {
|
||||
int error_code;
|
||||
clusterNode *n = getNodeByQuery(c,c->cmd,c->argv,c->argc,&hashslot,&error_code);
|
||||
if (n == NULL || n != server.cluster->myself) {
|
||||
flagTransaction(c);
|
||||
if (c->cmd->proc == execCommand) {
|
||||
discardTransaction(c);
|
||||
} else {
|
||||
flagTransaction(c);
|
||||
}
|
||||
clusterRedirectClient(c,n,hashslot,error_code);
|
||||
return REDIS_OK;
|
||||
}
|
||||
|
Reference in New Issue
Block a user