From 1ae50a9b1dd0ac9cebb694a184b7da67543d1d60 Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 10 Feb 2014 19:10:21 +0100 Subject: [PATCH] Cluster: redis-trib fix: cover new case of open slot. The case is the trivial one a single node claiming the slot as migrating, without nodes claiming it as importing. --- src/redis-trib.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/redis-trib.rb b/src/redis-trib.rb index e1956e4b..147d3132 100755 --- a/src/redis-trib.rb +++ b/src/redis-trib.rb @@ -470,6 +470,9 @@ class RedisTrib # importing state in 1 slot. That's trivial to address. if migrating.length == 1 && importing.length == 1 move_slot(migrating[0],importing[0],slot,:verbose=>true) + elsif migrating.length == 1 && importing.length == 0 + xputs ">>> Setting #{slot} as STABLE" + migrating[0].r.cluster("setslot",slot,"stable") else xputs "[ERR] Sorry, Redis-trib can't fix this slot yet (work in progress)" end