diff options
author | antirez <antirez@gmail.com> | 2014-05-21 18:17:02 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2014-05-21 18:17:02 +0200 |
commit | 762b1ae2becf26c5ae5b4dc3e31b7f93cc2a5302 (patch) | |
tree | aa1091fc7547be34f7f4f4b0dd74785158fa6eab /src/redis-trib.rb | |
parent | c68c78719f3e790fe655d1dd2a6b8ae1de4ae456 (diff) | |
download | redis-762b1ae2becf26c5ae5b4dc3e31b7f93cc2a5302.tar.gz |
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.
Diffstat (limited to 'src/redis-trib.rb')
-rwxr-xr-x | src/redis-trib.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/redis-trib.rb b/src/redis-trib.rb index 212493db5..26ebd48df 100755 --- a/src/redis-trib.rb +++ b/src/redis-trib.rb @@ -469,6 +469,8 @@ class RedisTrib # number of keys, among the set of migrating / importing nodes. if !owner xputs "*** Fix me, some work to do here." + # Select owner... + # Use ADDSLOTS to assign the slot. exit 1 end @@ -498,7 +500,7 @@ class RedisTrib next if node == owner move_slot(node,owner,slot,:verbose=>true,:fix=>true,:cold=>true) xputs ">>> Setting #{slot} as STABLE in #{node}" - importing[0].r.cluster("setslot",slot,"stable") + node.r.cluster("setslot",slot,"stable") } else xputs "[ERR] Sorry, Redis-trib can't fix this slot yet (work in progress)" |