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
d38d2fdf
"client-libraries/vscode:/vscode.git/clone" did not exist on "9495122b1853a97b3f15f0ddbf69d69698f9c82b"
Commit
d38d2fdf
authored
Sep 30, 2011
by
antirez
Browse files
Fixed two bugs in the CLUSTER SETSLOT ... NODE subcommand
parent
9a38df87
Changes
1
Show whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
d38d2fdf
...
@@ -1276,7 +1276,7 @@ void clusterCommand(redisClient *c) {
...
@@ -1276,7 +1276,7 @@ void clusterCommand(redisClient *c) {
/* CLUSTER SETSLOT <SLOT> STABLE */
/* CLUSTER SETSLOT <SLOT> STABLE */
server
.
cluster
.
importing_slots_from
[
slot
]
=
NULL
;
server
.
cluster
.
importing_slots_from
[
slot
]
=
NULL
;
server
.
cluster
.
migrating_slots_to
[
slot
]
=
NULL
;
server
.
cluster
.
migrating_slots_to
[
slot
]
=
NULL
;
}
else
if
(
!
strcasecmp
(
c
->
argv
[
3
]
->
ptr
,
"node"
)
&&
c
->
argc
==
4
)
{
}
else
if
(
!
strcasecmp
(
c
->
argv
[
3
]
->
ptr
,
"node"
)
&&
c
->
argc
==
5
)
{
/* CLUSTER SETSLOT <SLOT> NODE <NODE ID> */
/* CLUSTER SETSLOT <SLOT> NODE <NODE ID> */
clusterNode
*
n
=
clusterLookupNode
(
c
->
argv
[
4
]
->
ptr
);
clusterNode
*
n
=
clusterLookupNode
(
c
->
argv
[
4
]
->
ptr
);
...
@@ -1293,7 +1293,7 @@ void clusterCommand(redisClient *c) {
...
@@ -1293,7 +1293,7 @@ void clusterCommand(redisClient *c) {
keys
=
zmalloc
(
sizeof
(
robj
*
)
*
1
);
keys
=
zmalloc
(
sizeof
(
robj
*
)
*
1
);
numkeys
=
GetKeysInSlot
(
slot
,
keys
,
1
);
numkeys
=
GetKeysInSlot
(
slot
,
keys
,
1
);
zfree
(
keys
);
zfree
(
keys
);
if
(
numkeys
=
=
0
)
{
if
(
numkeys
!
=
0
)
{
addReplyErrorFormat
(
c
,
"Can't assign hashslot %d to a different node while I still hold keys for this hash slot."
,
slot
);
addReplyErrorFormat
(
c
,
"Can't assign hashslot %d to a different node while I still hold keys for this hash slot."
,
slot
);
return
;
return
;
}
}
...
...
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