Cluster: don't allow CLUSTER SETSLOT with slaves.
This commit is contained in:
parent
9361687f30
commit
0c2ee17244
@ -3940,6 +3940,11 @@ void clusterCommand(client *c) {
|
||||
int slot;
|
||||
clusterNode *n;
|
||||
|
||||
if (nodeIsSlave(myself)) {
|
||||
addReplyError(c,"Please use SETSLOT only with masters.");
|
||||
return;
|
||||
}
|
||||
|
||||
if ((slot = getSlotOrReply(c,c->argv[2])) == -1) return;
|
||||
|
||||
if (!strcasecmp(c->argv[3]->ptr,"migrating") && c->argc == 5) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user