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
0cf2df84
"vscode:/vscode.git/clone" did not exist on "2753acf1d642628d01de0d2a477c5d905fb761bc"
Unverified
Commit
0cf2df84
authored
Aug 12, 2021
by
Madelyn Olson
Committed by
GitHub
Aug 12, 2021
Browse files
Added additional validation for cluster SETSLOT (#9360)
parent
2402f5a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
0cf2df84
...
@@ -4652,6 +4652,10 @@ NULL
...
@@ -4652,6 +4652,10 @@ NULL
(
char
*
)
c
->
argv
[
4
]
->
ptr
);
(
char
*
)
c
->
argv
[
4
]
->
ptr
);
return
;
return
;
}
}
if
(
nodeIsSlave
(
n
))
{
addReplyError
(
c
,
"Target node is not a master"
);
return
;
}
server
.
cluster
->
migrating_slots_to
[
slot
]
=
n
;
server
.
cluster
->
migrating_slots_to
[
slot
]
=
n
;
}
else
if
(
!
strcasecmp
(
c
->
argv
[
3
]
->
ptr
,
"importing"
)
&&
c
->
argc
==
5
)
{
}
else
if
(
!
strcasecmp
(
c
->
argv
[
3
]
->
ptr
,
"importing"
)
&&
c
->
argc
==
5
)
{
if
(
server
.
cluster
->
slots
[
slot
]
==
myself
)
{
if
(
server
.
cluster
->
slots
[
slot
]
==
myself
)
{
...
@@ -4664,6 +4668,10 @@ NULL
...
@@ -4664,6 +4668,10 @@ NULL
(
char
*
)
c
->
argv
[
4
]
->
ptr
);
(
char
*
)
c
->
argv
[
4
]
->
ptr
);
return
;
return
;
}
}
if
(
nodeIsSlave
(
n
))
{
addReplyError
(
c
,
"Target node is not a master"
);
return
;
}
server
.
cluster
->
importing_slots_from
[
slot
]
=
n
;
server
.
cluster
->
importing_slots_from
[
slot
]
=
n
;
}
else
if
(
!
strcasecmp
(
c
->
argv
[
3
]
->
ptr
,
"stable"
)
&&
c
->
argc
==
4
)
{
}
else
if
(
!
strcasecmp
(
c
->
argv
[
3
]
->
ptr
,
"stable"
)
&&
c
->
argc
==
4
)
{
/* CLUSTER SETSLOT <SLOT> STABLE */
/* CLUSTER SETSLOT <SLOT> STABLE */
...
...
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