Cluster: new command flag forcing implicit ASKING.

Also using this new flag the RESTORE-ASKING command was implemented that
will be used by MIGRATE.
This commit is contained in:
antirez
2013-02-20 17:28:35 +01:00
parent 9ec1b709f5
commit ea7fc82a4a
3 changed files with 6 additions and 1 deletions

View File

@ -2007,7 +2007,7 @@ clusterNode *getNodeByQuery(redisClient *c, struct redisCommand *cmd, robj **arg
* it is assigned to a different node, but only if the client
* issued an ASKING command before. */
if (server.cluster->importing_slots_from[slot] != NULL &&
c->flags & REDIS_ASKING) {
(c->flags & REDIS_ASKING || cmd->flags & REDIS_CMD_ASKING)) {
return server.cluster->myself;
}
/* It's not a -ASK case. Base case: just return the right node. */