CLUSTER KEYSLOT command
This commit is contained in:
parent
467a2d613b
commit
ee3ddf1ada
@ -1205,6 +1205,10 @@ void clusterCommand(redisClient *c) {
|
|||||||
(unsigned long)sdslen(info)));
|
(unsigned long)sdslen(info)));
|
||||||
addReplySds(c,info);
|
addReplySds(c,info);
|
||||||
addReply(c,shared.crlf);
|
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 {
|
} else {
|
||||||
addReplyError(c,"Wrong CLUSTER subcommand or number of arguments");
|
addReplyError(c,"Wrong CLUSTER subcommand or number of arguments");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user