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
656c3ffe
You need to sign in or sign up before continuing.
Commit
656c3ffe
authored
Sep 25, 2013
by
antirez
Browse files
Cluster: fix redis-trib node config fingerprinting for new nodes format.
parent
341ed1d1
Changes
1
Show whitespace changes
Inline
Side-by-side
src/redis-trib.rb
View file @
656c3ffe
...
@@ -119,7 +119,7 @@ class ClusterNode
...
@@ -119,7 +119,7 @@ class ClusterNode
# name addr flags role ping_sent ping_recv link_status slots
# name addr flags role ping_sent ping_recv link_status slots
split
=
n
.
split
split
=
n
.
split
name
,
addr
,
flags
,
role
,
ping_sent
,
ping_recv
,
config_epoch
,
link_status
=
split
[
0
..
6
]
name
,
addr
,
flags
,
role
,
ping_sent
,
ping_recv
,
config_epoch
,
link_status
=
split
[
0
..
6
]
slots
=
split
[
7
..-
1
]
slots
=
split
[
8
..-
1
]
info
=
{
info
=
{
:name
=>
name
,
:name
=>
name
,
:addr
=>
addr
,
:addr
=>
addr
,
...
@@ -230,7 +230,7 @@ class ClusterNode
...
@@ -230,7 +230,7 @@ class ClusterNode
config
=
[]
config
=
[]
@r
.
cluster
(
"nodes"
).
each_line
{
|
l
|
@r
.
cluster
(
"nodes"
).
each_line
{
|
l
|
s
=
l
.
split
s
=
l
.
split
slots
=
s
[
7
..-
1
].
select
{
|
x
|
x
[
0
..
0
]
!=
"["
}
slots
=
s
[
8
..-
1
].
select
{
|
x
|
x
[
0
..
0
]
!=
"["
}
next
if
slots
.
length
==
0
next
if
slots
.
length
==
0
config
<<
s
[
0
]
+
":"
+
(
slots
.
sort
.
join
(
","
))
config
<<
s
[
0
]
+
":"
+
(
slots
.
sort
.
join
(
","
))
}
}
...
...
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