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
fa6f4f21
Commit
fa6f4f21
authored
Feb 10, 2014
by
antirez
Browse files
Cluster: ignore slot config changes if we are importing it.
parent
30214fff
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
fa6f4f21
...
...
@@ -1112,8 +1112,10 @@ void clusterUpdateSlotsConfigWith(clusterNode *sender, uint64_t senderConfigEpoc
if
(
bitmapTestBit
(
slots
,
j
))
{
/* We rebind the slot to the new node claiming it if:
* 1) The slot was unassigned.
* 2) The new node claims it with a greater configEpoch. */
if
(
server
.
cluster
->
slots
[
j
]
==
sender
)
continue
;
* 2) The new node claims it with a greater configEpoch.
* 3) We are not currently importing the slot. */
if
(
server
.
cluster
->
slots
[
j
]
==
sender
||
server
.
cluster
->
importing_slots_from
[
j
])
continue
;
if
(
server
.
cluster
->
slots
[
j
]
==
NULL
||
server
.
cluster
->
slots
[
j
]
->
configEpoch
<
senderConfigEpoch
)
{
...
...
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