Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
524be1e4
Commit
524be1e4
authored
Jan 11, 2016
by
antirez
Browse files
Cluster: don't allow CLUSTER SETSLOT with slaves.
parent
f43c794b
Changes
1
Show whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
524be1e4
...
@@ -3940,6 +3940,11 @@ void clusterCommand(client *c) {
...
@@ -3940,6 +3940,11 @@ void clusterCommand(client *c) {
int
slot
;
int
slot
;
clusterNode
*
n
;
clusterNode
*
n
;
if
(
nodeIsSlave
(
myself
))
{
addReplyError
(
c
,
"Please use SETSLOT only with masters."
);
return
;
}
if
((
slot
=
getSlotOrReply
(
c
,
c
->
argv
[
2
]))
==
-
1
)
return
;
if
((
slot
=
getSlotOrReply
(
c
,
c
->
argv
[
2
]))
==
-
1
)
return
;
if
(
!
strcasecmp
(
c
->
argv
[
3
]
->
ptr
,
"migrating"
)
&&
c
->
argc
==
5
)
{
if
(
!
strcasecmp
(
c
->
argv
[
3
]
->
ptr
,
"migrating"
)
&&
c
->
argc
==
5
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment