From a26690e8b574aa60153655fb555004c7d48a299e Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 14 Feb 2013 12:55:34 +0100 Subject: [PATCH] Cluster: redis-trib updated to use 16384 hash slots. --- src/redis-trib.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/redis-trib.rb b/src/redis-trib.rb index 58ad5a86..ff57d889 100755 --- a/src/redis-trib.rb +++ b/src/redis-trib.rb @@ -24,7 +24,7 @@ require 'rubygems' require 'redis' -ClusterHashSlots = 4096 +ClusterHashSlots = 16384 def xputs(s) printf s @@ -238,10 +238,10 @@ class RedisTrib @nodes.each{|n| slots = slots.merge(n.slots) } - if slots.length == 4096 - puts "[OK] All 4096 slots covered." + if slots.length == ClusterHashSlots + puts "[OK] All #{ClusterHashSlots} slots covered." else - errors << "[ERR] Not all 4096 slots are covered by nodes." + errors << "[ERR] Not all #{ClusterHashSlots} slots are covered by nodes." puts errors[-1] end return errors @@ -384,8 +384,8 @@ class RedisTrib exit 1 end numslots = 0 - while numslots <= 0 or numslots > 4096 - print "How many slots do you want to move (from 1 to 4096)? " + while numslots <= 0 or numslots > ClusterHashSlots + print "How many slots do you want to move (from 1 to #{ClusterHashSlots})? " numslots = STDIN.gets.to_i end target = nil