mirror of
https://github.com/fluencelabs/redis
synced 2025-03-30 22:31:03 +00:00
CLUSTER KEYSLOT command
This commit is contained in:
parent
d37299e3b7
commit
1eb713a4c1
@ -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