diff --git a/src/cluster.c b/src/cluster.c index b35487553..6c43bbf8d 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -1205,6 +1205,10 @@ void clusterCommand(redisClient *c) { (unsigned long)sdslen(info))); addReplySds(c,info); addReply(c,shared.crlf); + } else if (!strcasecmp(c->argv[1]->ptr,"keyslot") && c->argc == 3) { + sds key = c->argv[2]->ptr; + + addReplyLongLong(c,keyHashSlot(key,sdslen(key))); } else { addReplyError(c,"Wrong CLUSTER subcommand or number of arguments"); }