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
d9565379
Commit
d9565379
authored
Jul 24, 2017
by
Salvatore Sanfilippo
Committed by
GitHub
Jul 24, 2017
Browse files
Merge pull request #4128 from leonchen83/unstable
fix mismatch argument and return wrong value of clusterDelNodeSlots
parents
7c3c472b
9e7a8c02
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
d9565379
...
@@ -3602,8 +3602,10 @@ int clusterDelNodeSlots(clusterNode *node) {
...
@@ -3602,8 +3602,10 @@ int clusterDelNodeSlots(clusterNode *node) {
int
deleted
=
0
,
j
;
int
deleted
=
0
,
j
;
for
(
j
=
0
;
j
<
CLUSTER_SLOTS
;
j
++
)
{
for
(
j
=
0
;
j
<
CLUSTER_SLOTS
;
j
++
)
{
if
(
clusterNodeGetSlotBit
(
node
,
j
))
clusterDelSlot
(
j
);
if
(
clusterNodeGetSlotBit
(
node
,
j
))
{
deleted
++
;
clusterDelSlot
(
j
);
deleted
++
;
}
}
}
return
deleted
;
return
deleted
;
}
}
...
@@ -4195,7 +4197,7 @@ void clusterCommand(client *c) {
...
@@ -4195,7 +4197,7 @@ void clusterCommand(client *c) {
}
}
if
((
n
=
clusterLookupNode
(
c
->
argv
[
4
]
->
ptr
))
==
NULL
)
{
if
((
n
=
clusterLookupNode
(
c
->
argv
[
4
]
->
ptr
))
==
NULL
)
{
addReplyErrorFormat
(
c
,
"I don't know about node %s"
,
addReplyErrorFormat
(
c
,
"I don't know about node %s"
,
(
char
*
)
c
->
argv
[
3
]
->
ptr
);
(
char
*
)
c
->
argv
[
4
]
->
ptr
);
return
;
return
;
}
}
server
.
cluster
->
importing_slots_from
[
slot
]
=
n
;
server
.
cluster
->
importing_slots_from
[
slot
]
=
n
;
...
...
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