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
d7eae8d8
Commit
d7eae8d8
authored
Mar 22, 2013
by
antirez
Browse files
redis-trib: fixed ClusterNode migrating/importing slots detection.
parent
1baa1530
Changes
1
Show whitespace changes
Inline
Side-by-side
src/redis-trib.rb
View file @
d7eae8d8
...
@@ -118,10 +118,10 @@ class ClusterNode
...
@@ -118,10 +118,10 @@ class ClusterNode
@info
[
:slots
]
=
{}
@info
[
:slots
]
=
{}
slots
.
each
{
|
s
|
slots
.
each
{
|
s
|
if
s
[
0
..
0
]
==
'['
if
s
[
0
..
0
]
==
'['
if
s
[
2
..
4
]
==
"->-"
# Migrating
if
s
.
index
(
"->-"
)
# Migrating
slot
,
dst
=
s
[
1
..-
1
].
split
(
"->-"
)
slot
,
dst
=
s
[
1
..-
1
].
split
(
"->-"
)
@info
[
:migrating
][
slot
]
=
dst
@info
[
:migrating
][
slot
]
=
dst
elsif
s
[
2
..
4
]
==
"-<-"
# Importing
elsif
s
.
index
(
"-<-"
)
# Importing
slot
,
src
=
s
[
1
..-
1
].
split
(
"-<-"
)
slot
,
src
=
s
[
1
..-
1
].
split
(
"-<-"
)
@info
[
:importing
][
slot
]
=
src
@info
[
:importing
][
slot
]
=
src
end
end
...
...
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