Merge "Fix unnecessary for-loop and mis docs"

This commit is contained in:
Jenkins
2017-01-16 16:36:00 +00:00
committed by Gerrit Code Review
2 changed files with 14 additions and 14 deletions

View File

@@ -1138,7 +1138,8 @@ class RingBuilder(object):
overweight_dev_replica.sort(
key=lambda dr: dr[0]['parts_wanted'])
for dev, replica in overweight_dev_replica:
dev, replica = overweight_dev_replica[0]
# this is the most overweight_device holding a replica of this
# part we don't know where it's going to end up - but we'll
# pick it up and hope for the best.
@@ -1150,7 +1151,6 @@ class RingBuilder(object):
part, replica, dev['id'])
self._replica2part2dev[replica][part] = NONE_DEV
self._set_part_moved(part)
break
def _reassign_parts(self, reassign_parts, replica_plan):
"""

View File

@@ -773,7 +773,7 @@ class TestRingBuilder(unittest.TestCase):
}
self.assertEqual(zone_histogram, expected)
# After rebalancing two more times, we expect that everything is in a
# After rebalancing one more times, we expect that everything is in a
# good state
rb.rebalance(seed=3)