Commit 762b1ae2 authored by antirez's avatar antirez
Browse files

Fix an error in redis-trib where we always talk with same node.

While iterating the list of nodes we want to set the slot as stable in
the current node, not always in the first node of the list.
parent c68c7871
...@@ -469,6 +469,8 @@ class RedisTrib ...@@ -469,6 +469,8 @@ class RedisTrib
# number of keys, among the set of migrating / importing nodes. # number of keys, among the set of migrating / importing nodes.
if !owner if !owner
xputs "*** Fix me, some work to do here." xputs "*** Fix me, some work to do here."
# Select owner...
# Use ADDSLOTS to assign the slot.
exit 1 exit 1
end end
...@@ -498,7 +500,7 @@ class RedisTrib ...@@ -498,7 +500,7 @@ class RedisTrib
next if node == owner next if node == owner
move_slot(node,owner,slot,:verbose=>true,:fix=>true,:cold=>true) move_slot(node,owner,slot,:verbose=>true,:fix=>true,:cold=>true)
xputs ">>> Setting #{slot} as STABLE in #{node}" xputs ">>> Setting #{slot} as STABLE in #{node}"
importing[0].r.cluster("setslot",slot,"stable") node.r.cluster("setslot",slot,"stable")
} }
else else
xputs "[ERR] Sorry, Redis-trib can't fix this slot yet (work in progress)" xputs "[ERR] Sorry, Redis-trib can't fix this slot yet (work in progress)"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment