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
dc4af606
Commit
dc4af606
authored
Feb 21, 2013
by
antirez
Browse files
Cluster: clusterAddSlot() was not doing what stated in the comment.
parent
fdb57233
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
dc4af606
...
@@ -1135,8 +1135,8 @@ int clusterNodeGetSlotBit(clusterNode *n, int slot) {
...
@@ -1135,8 +1135,8 @@ int clusterNodeGetSlotBit(clusterNode *n, int slot) {
* If the slot is already assigned to another instance this is considered
* If the slot is already assigned to another instance this is considered
* an error and REDIS_ERR is returned. */
* an error and REDIS_ERR is returned. */
int
clusterAddSlot
(
clusterNode
*
n
,
int
slot
)
{
int
clusterAddSlot
(
clusterNode
*
n
,
int
slot
)
{
if
(
clusterNodeSetSlotBit
(
n
,
slot
)
!=
0
)
if
(
server
.
cluster
->
slots
[
slot
]
)
return
REDIS_ERR
;
return
REDIS_ERR
;
clusterNodeSetSlotBit
(
n
,
slot
)
;
server
.
cluster
->
slots
[
slot
]
=
n
;
server
.
cluster
->
slots
[
slot
]
=
n
;
return
REDIS_OK
;
return
REDIS_OK
;
}
}
...
...
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