Before that PR, processCommand() did not notice that cmd could be a module command in which case getkeys_proc member has a different meaning. The outcome was that a module command which doesn't take any key names in its arguments (similar to SLOWLOG) would be handled as if it might have key name arguments (similar to MEMORY), would consider cluster redirect but will end up with 0 keys after an excessive call to getKeysFromCommand, and eventually do the right thing.
This commit is contained in:
parent
7853d8410b
commit
2054cf46c4
@ -3430,7 +3430,8 @@ void rejectCommandFormat(client *c, const char *fmt, ...) {
|
||||
sdsfree(s);
|
||||
}
|
||||
|
||||
/* A command that uses keys but has no pre-determined key position arguments. */
|
||||
/* Returns 1 for commands that may have key names in their arguments, but have
|
||||
* no pre-determined key positions. */
|
||||
static int cmdHasMovableKeys(struct redisCommand *cmd) {
|
||||
return (cmd->getkeys_proc && !(cmd->flags & CMD_MODULE)) ||
|
||||
cmd->flags & CMD_MODULE_GETKEYS;
|
||||
|
Loading…
x
Reference in New Issue
Block a user