diff --git a/src/server.c b/src/server.c index 4c480fad2..bab8bb67e 100644 --- a/src/server.c +++ b/src/server.c @@ -2385,7 +2385,8 @@ int processCommand(client *c) { !(c->flags & CLIENT_MASTER) && !(c->flags & CLIENT_LUA && server.lua_caller->flags & CLIENT_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; @@ -2397,7 +2398,11 @@ int processCommand(client *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 C_OK; }