mirror of
https://github.com/fluencelabs/redis
synced 2025-03-17 16:10:50 +00:00
redis-trib: fixed slot allocation when --replicas is used.
This commit is contained in:
parent
e1a1d904de
commit
d75ab87226
@ -517,10 +517,10 @@ class RedisTrib
|
||||
|
||||
# Alloc slots on masters
|
||||
i = 0
|
||||
masters.each{|n|
|
||||
masters.each_with_index{|n,masternum|
|
||||
first = i*slots_per_node
|
||||
last = first+slots_per_node-1
|
||||
last = ClusterHashSlots-1 if i == @nodes.length-1
|
||||
last = ClusterHashSlots-1 if masternum == masters.length-1
|
||||
n.add_slots first..last
|
||||
i += 1
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user