From d7eae8d8d7c4fd2c5cf4f8a6c31a9a2d2c876877 Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 22 Mar 2013 12:53:37 +0100 Subject: [PATCH] redis-trib: fixed ClusterNode migrating/importing slots detection. --- src/redis-trib.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/redis-trib.rb b/src/redis-trib.rb index 33b2aadc..5219ddd1 100755 --- a/src/redis-trib.rb +++ b/src/redis-trib.rb @@ -118,10 +118,10 @@ class ClusterNode @info[:slots] = {} slots.each{|s| if s[0..0] == '[' - if s[2..4] == "->-" # Migrating + if s.index("->-") # Migrating slot,dst = s[1..-1].split("->-") @info[:migrating][slot] = dst - elsif s[2..4] == "-<-" # Importing + elsif s.index("-<-") # Importing slot,src = s[1..-1].split("-<-") @info[:importing][slot] = src end