mirror of
http://github.com/valkey-io/valkey
synced 2024-11-22 00:52:38 +00:00
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
3f2fbc4c61
commit
f7f77a746a
@ -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…
Reference in New Issue
Block a user