summaryrefslogtreecommitdiff
path: root/src/redis-trib.rb
diff options
context:
space:
mode:
authorMatt Stancliff <matt@genges.com>2014-03-21 14:42:38 -0400
committerMatt Stancliff <matt@genges.com>2014-03-24 10:17:44 -0400
commite942f3ce0fee5033d2d4b4e8c5b9f1d912a1d370 (patch)
tree9efd485d798ddb78396ab78c57626b02b48998c6 /src/redis-trib.rb
parent93253c27620647deb3cb60e2666fbf7db9eff4cb (diff)
downloadredis-e942f3ce0fee5033d2d4b4e8c5b9f1d912a1d370.tar.gz
Cluster: Restore proper trib master iteration
This got removed in 2e5c394 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
Diffstat (limited to 'src/redis-trib.rb')
-rwxr-xr-xsrc/redis-trib.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/redis-trib.rb b/src/redis-trib.rb
index cfe04d203..298271050 100755
--- a/src/redis-trib.rb
+++ b/src/redis-trib.rb
@@ -572,6 +572,7 @@ class RedisTrib
nodes_count -= 1
i += 1
puts "Adding replica #{slave} to #{m}"
+ break
}
end
}