1
0
mirror of https://github.com/fluencelabs/redis synced 2025-03-18 16:40:50 +00:00

Cluster: CLUSTER SAVECONFIG command added.

This commit is contained in:
antirez 2013-09-04 10:32:09 +02:00
parent 528201ad6c
commit 8eff339ca4

@ -2314,6 +2314,14 @@ void clusterCommand(redisClient *c) {
(unsigned long)sdslen(info)));
addReplySds(c,info);
addReply(c,shared.crlf);
} else if (!strcasecmp(c->argv[1]->ptr,"saveconfig") && c->argc == 2) {
int retval = clusterSaveConfig();
if (retval == 0)
addReply(c,shared.ok);
else
addReplyErrorFormat(c,"error saving the cluster node config: %s",
strerror(errno));
} else if (!strcasecmp(c->argv[1]->ptr,"keyslot") && c->argc == 3) {
/* CLUSTER KEYSLOT <key> */
sds key = c->argv[2]->ptr;