Commit 1eb713a4 authored by antirez's avatar antirez
Browse files

CLUSTER KEYSLOT command

parent d37299e3
......@@ -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");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment