mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 17:10:50 +00:00
redis-trib: fixed ClusterNode migrating/importing slots detection.
This commit is contained in:
parent
1baa153028
commit
d7eae8d8d7
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user