Commit 4af72d32 authored by Matt Stancliff's avatar Matt Stancliff Committed by antirez
Browse files

Cluster: Restore proper trib master iteration

This got removed in 2e5c394f during a new feature addition.

The prior commit had "break if masters.length == masters_count"
but we are guaranteed to aready have that condition met since
otherwise we would haven't gotten this far.

Without this break statement, it's possible some masters may
be forgotten and have zero replicas while other masters have
more than their requested number of replicas.

Thanks to carlos for pointing out this regression at:
https://groups.google.com/forum/#!topic/redis-db/_WVVqDw5B7c
parent ee18135a
...@@ -586,6 +586,7 @@ class RedisTrib ...@@ -586,6 +586,7 @@ class RedisTrib
nodes_count -= 1 nodes_count -= 1
assigned_replicas += 1 assigned_replicas += 1
puts "Adding replica #{slave} to #{m}" puts "Adding replica #{slave} to #{m}"
break
} }
end end
} }
......
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