mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 17:10:50 +00:00
Revert "fix repeat argument issue and reduce unnessary loop times for redis-cli."
Reverts commit 9505dd2011ef7143670b68247ff1818ffbad9768 since the commit introduced the very serious bug issue #5286.
This commit is contained in:
parent
394b974920
commit
9f43264f86
@ -1173,16 +1173,6 @@ static int cliSendCommand(int argc, char **argv, long repeat) {
|
|||||||
} else if (!strcasecmp(command,"auth") && argc == 2) {
|
} else if (!strcasecmp(command,"auth") && argc == 2) {
|
||||||
cliSelect();
|
cliSelect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Issue the command again if we got redirected in cluster mode */
|
|
||||||
if (config.cluster_mode && config.cluster_reissue_command) {
|
|
||||||
cliConnect(CC_FORCE);
|
|
||||||
config.cluster_reissue_command = 0;
|
|
||||||
/* for a '-MOVED' or '-ASK' response, we need to issue the command again, so
|
|
||||||
* add repeat by 1. */
|
|
||||||
repeat++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (config.interval) usleep(config.interval);
|
if (config.interval) usleep(config.interval);
|
||||||
fflush(stdout); /* Make it grep friendly */
|
fflush(stdout); /* Make it grep friendly */
|
||||||
@ -1563,9 +1553,14 @@ static int issueCommandRepeat(int argc, char **argv, long repeat) {
|
|||||||
cliPrintContextError();
|
cliPrintContextError();
|
||||||
return REDIS_ERR;
|
return REDIS_ERR;
|
||||||
}
|
}
|
||||||
} else
|
}
|
||||||
|
/* Issue the command again if we got redirected in cluster mode */
|
||||||
|
if (config.cluster_mode && config.cluster_reissue_command) {
|
||||||
|
cliConnect(CC_FORCE);
|
||||||
|
} else {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return REDIS_OK;
|
return REDIS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user