)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"07cc84cce2626a175a5fa61ce2835330d5dbf2c0","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"During the initial gather for balance we prefer to avoid replicas on"},{"line_number":12,"context_line":"over-weight devices that are already under-represented in any of it\u0027s"},{"line_number":13,"context_line":"tiers (i.e. if a zone has to have at least one, but may have as many of"},{"line_number":14,"context_line":"two, don\u0027t take the only replica).  Instead we hope by going for"},{"line_number":15,"context_line":"replicas on over-weight devices that are at the limits of their"},{"line_number":16,"context_line":"dispersion we might have a better than even chance we find a better"},{"line_number":17,"context_line":"place for them during placement!"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"7f515b1d_ee45ba71","line":14,"range":{"start_line":13,"start_character":6,"end_line":14,"end_character":33},"updated":"2017-09-25 12:03:52.000000000","message":"ok, this is what doing in _can_disperse originally.","commit_id":"bfaa6cbc4f576f6c36f3bea7fe7b37a1a13ce4d3"}],"swift/common/ring/builder.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e5215a52d2d6a75ecd29fdca5f04a55f63a91dea","unresolved":false,"context_lines":[{"line_number":1152,"context_line":"                    part, replica, pretty_dev(dev),"},{"line_number":1153,"context_line":"                    \u0027,\u0027.join(stuck_here),"},{"line_number":1154,"context_line":"                    dev[\u0027parts_wanted\u0027])"},{"line_number":1155,"context_line":""},{"line_number":1156,"context_line":"            overweight_dev_replica.sort("},{"line_number":1157,"context_line":"                key\u003dlambda dr: dr[0][\u0027parts_wanted\u0027])"},{"line_number":1158,"context_line":"            for dev, replica in overweight_dev_replica:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f2577a7_04964c94","line":1155,"updated":"2017-09-15 15:47:03.000000000","message":"this is all debug - it should come out","commit_id":"f077b36638715734f65f8ef00f39625a5874d332"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"07cc84cce2626a175a5fa61ce2835330d5dbf2c0","unresolved":false,"context_lines":[{"line_number":1104,"context_line":"        for dev in self._iter_devs():"},{"line_number":1105,"context_line":"            wanted \u003d max(dev[\u0027parts_wanted\u0027], 0)"},{"line_number":1106,"context_line":"            for tier in dev[\u0027tiers\u0027]:"},{"line_number":1107,"context_line":"                parts_wanted_in_tier[tier] +\u003d wanted"},{"line_number":1108,"context_line":"        # Last, we gather partitions from devices that are \"overweight\" because"},{"line_number":1109,"context_line":"        # they have more partitions than their parts_wanted."},{"line_number":1110,"context_line":"        for offset in range(self.parts):"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f515b1d_f36c8509","line":1107,"updated":"2017-09-25 12:03:52.000000000","message":"memo) Those new lines will create parts_wanted_in_tier dict to summarize how many partitions are wanted in the tier.","commit_id":"bfaa6cbc4f576f6c36f3bea7fe7b37a1a13ce4d3"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"07cc84cce2626a175a5fa61ce2835330d5dbf2c0","unresolved":false,"context_lines":[{"line_number":1137,"context_line":"                       replica_plan[tier][\u0027max\u0027]"},{"line_number":1138,"context_line":"                       for tier in dev[\u0027tiers\u0027]):"},{"line_number":1139,"context_line":"                    # we\u0027re stuck by replica plan"},{"line_number":1140,"context_line":"                    continue"},{"line_number":1141,"context_line":"                for t in reversed(dev[\u0027tiers\u0027]):"},{"line_number":1142,"context_line":"                    if replicas_at_tier[t] - 1 \u003c replica_plan[t][\u0027min\u0027]:"},{"line_number":1143,"context_line":"                        # we\u0027re stuck at tier t"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f515b1d_13516137","line":1140,"updated":"2017-09-25 12:03:52.000000000","message":"memo) ok, we\u0027re still considering dispersion in _can_disperse.","commit_id":"bfaa6cbc4f576f6c36f3bea7fe7b37a1a13ce4d3"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"a4b404c0fbc00544a7fcf8de6ac32d422cb24d1b","unresolved":false,"context_lines":[{"line_number":1142,"context_line":"                    if replicas_at_tier[t] - 1 \u003c replica_plan[t][\u0027min\u0027]:"},{"line_number":1143,"context_line":"                        # we\u0027re stuck at tier t"},{"line_number":1144,"context_line":"                        break"},{"line_number":1145,"context_line":"                if sum(parts_wanted_in_tier[c]"},{"line_number":1146,"context_line":"                       for c in tier2children[t]"},{"line_number":1147,"context_line":"                       if c not in dev[\u0027tiers\u0027]) \u003c\u003d 0:"},{"line_number":1148,"context_line":"                    # we\u0027re stuck by weight"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f515b1d_fa544623","line":1145,"updated":"2017-09-25 19:46:50.000000000","message":"I feel like if we don\u0027t break from above we end up at the cluster level - and sum of the the weight wanted across all the regions will never be \u003c\u003d zero - so maybe this code is cheap \u0026 correct?  But idk, I think it seems a little hard to follow... open to suggestions!","commit_id":"bfaa6cbc4f576f6c36f3bea7fe7b37a1a13ce4d3"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"9ed76f055fe13e40f6ababde6805574151a7814e","unresolved":false,"context_lines":[{"line_number":1142,"context_line":"                    if replicas_at_tier[t] - 1 \u003c replica_plan[t][\u0027min\u0027]:"},{"line_number":1143,"context_line":"                        # we\u0027re stuck at tier t"},{"line_number":1144,"context_line":"                        break"},{"line_number":1145,"context_line":"                if sum(parts_wanted_in_tier[c]"},{"line_number":1146,"context_line":"                       for c in tier2children[t]"},{"line_number":1147,"context_line":"                       if c not in dev[\u0027tiers\u0027]) \u003c\u003d 0:"},{"line_number":1148,"context_line":"                    # we\u0027re stuck by weight"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f515b1d_4686d9dd","line":1145,"in_reply_to":"7f515b1d_fa544623","updated":"2017-09-26 02:41:47.000000000","message":"yeah, we shouldn\u0027t hit the break at the cluster level. I checked the sanity with \n\n  # avoid the top of cluster level here\n  for t in reversed(dev[\u0027tiers\u0027][:-1]):\n    if replicas_at_tier[t] - 1 \u003c replica_plan[t][\u0027min\u0027]\n      break\n\nthat also works well with the newest test. it seems reasonably cheep to keep current code because that will be only one if condition check addition even we don\u0027t have to skip the device.","commit_id":"bfaa6cbc4f576f6c36f3bea7fe7b37a1a13ce4d3"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"07cc84cce2626a175a5fa61ce2835330d5dbf2c0","unresolved":false,"context_lines":[{"line_number":1146,"context_line":"                       for c in tier2children[t]"},{"line_number":1147,"context_line":"                       if c not in dev[\u0027tiers\u0027]) \u003c\u003d 0:"},{"line_number":1148,"context_line":"                    # we\u0027re stuck by weight"},{"line_number":1149,"context_line":"                    continue"},{"line_number":1150,"context_line":"                # this is the most overweight_device holding a replica"},{"line_number":1151,"context_line":"                # of this part that can shed it according to the plan"},{"line_number":1152,"context_line":"                dev[\u0027parts_wanted\u0027] +\u003d 1"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f515b1d_6e6d4a97","line":1149,"updated":"2017-09-25 12:03:52.000000000","message":"Hmm... I may be missing something but it seems like we don\u0027t have the coverage for those new lines???\n\nThe comments and code looks correct to me. If we don\u0027t find new device to assign the gathered part under the tier we should skip it.\n\nHowever, when I commented out L1141-L1149, no unit tests failed in my env.\n\nAh... perhaps, this is for optimization for calculation? If we could hit the completely balanced case, we don\u0027t have to pick up any part unless overload factor is set to disperse. Hence no result should be changed but the time (and CPU) should be saved... right?\n\nHmmmm.... I just wanted to make a test for those condition, like\n\ndiff --git a/test/unit/common/ring/test_builder.py b/test/unit/common/ring/test_builder.py\nindex a02473d..db540b4 100644\n--- a/test/unit/common/ring/test_builder.py\n+++ b/test/unit/common/ring/test_builder.py\n@@ -2495,6 +2495,12 @@ class TestRingBuilder(unittest.TestCase):\n         # dispersion doesn\u0027t get any worse\n         self.assertEqual(rb.dispersion, 59.765625)\n \n+        # try again\n+        rb.rebalance(seed\u003d7)\n+\n+        for part in range(rb.parts):\n+            self.assertFalse(rb._has_part_moved(part))\n+\n     def test_undispersable_server_converge_on_balance(self):\n         rb \u003d ring.RingBuilder(8, 6, 0)\n         dev_id \u003d 0\n\nbut neither w/ change nor w/o failed. In the experimental result, it looks like completely balanced ring hits L1129 (i.e. no overweighted device found) so we already may skip the state \"stuck by weight\"\n\nCurrently, I\u0027m still trying to understand this situation...","commit_id":"bfaa6cbc4f576f6c36f3bea7fe7b37a1a13ce4d3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"214b22723fef3dd1f62a4fb6702d6ecded8d047a","unresolved":false,"context_lines":[{"line_number":1146,"context_line":"                       for c in tier2children[t]"},{"line_number":1147,"context_line":"                       if c not in dev[\u0027tiers\u0027]) \u003c\u003d 0:"},{"line_number":1148,"context_line":"                    # we\u0027re stuck by weight"},{"line_number":1149,"context_line":"                    continue"},{"line_number":1150,"context_line":"                # this is the most overweight_device holding a replica"},{"line_number":1151,"context_line":"                # of this part that can shed it according to the plan"},{"line_number":1152,"context_line":"                dev[\u0027parts_wanted\u0027] +\u003d 1"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f515b1d_ff99d878","line":1149,"in_reply_to":"7f515b1d_6e6d4a97","updated":"2017-09-25 18:59:58.000000000","message":"I got like 10 failures by putting a NameError here -- I guess we should add some assertions about how many parts moved? To show that fewer parts get picked up just to be set back in the same place.","commit_id":"bfaa6cbc4f576f6c36f3bea7fe7b37a1a13ce4d3"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"a4b404c0fbc00544a7fcf8de6ac32d422cb24d1b","unresolved":false,"context_lines":[{"line_number":1146,"context_line":"                       for c in tier2children[t]"},{"line_number":1147,"context_line":"                       if c not in dev[\u0027tiers\u0027]) \u003c\u003d 0:"},{"line_number":1148,"context_line":"                    # we\u0027re stuck by weight"},{"line_number":1149,"context_line":"                    continue"},{"line_number":1150,"context_line":"                # this is the most overweight_device holding a replica"},{"line_number":1151,"context_line":"                # of this part that can shed it according to the plan"},{"line_number":1152,"context_line":"                dev[\u0027parts_wanted\u0027] +\u003d 1"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f515b1d_3a841eb1","line":1149,"in_reply_to":"7f515b1d_ff99d878","updated":"2017-09-25 19:46:50.000000000","message":"when I commented out these lines I also found that no current assertions *required* them - but they are *essential* in order to balance the topology of the ring described in the lp bug report with the bash script.","commit_id":"bfaa6cbc4f576f6c36f3bea7fe7b37a1a13ce4d3"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"07cc84cce2626a175a5fa61ce2835330d5dbf2c0","unresolved":false,"context_lines":[{"line_number":1186,"context_line":"        if disperse_first:"},{"line_number":1187,"context_line":"            self._gather_parts_for_balance_can_disperse("},{"line_number":1188,"context_line":"                assign_parts, start, replica_plan)"},{"line_number":1189,"context_line":"        self._gather_parts_for_balance_forced(assign_parts, start)"},{"line_number":1190,"context_line":""},{"line_number":1191,"context_line":"    def _gather_parts_for_balance_forced(self, assign_parts, start, **kwargs):"},{"line_number":1192,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"7f515b1d_9300b136","line":1189,"updated":"2017-09-25 12:03:52.000000000","message":"It has made me sense since PTG discussion, here. Even we called _can_disperse in the first try, it could leave several partitions due to the dispersion strategy so calling _forced here will result in just either gathering those partitions quickly or doing nothing, IIUC.","commit_id":"bfaa6cbc4f576f6c36f3bea7fe7b37a1a13ce4d3"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"a4b404c0fbc00544a7fcf8de6ac32d422cb24d1b","unresolved":false,"context_lines":[{"line_number":1186,"context_line":"        if disperse_first:"},{"line_number":1187,"context_line":"            self._gather_parts_for_balance_can_disperse("},{"line_number":1188,"context_line":"                assign_parts, start, replica_plan)"},{"line_number":1189,"context_line":"        self._gather_parts_for_balance_forced(assign_parts, start)"},{"line_number":1190,"context_line":""},{"line_number":1191,"context_line":"    def _gather_parts_for_balance_forced(self, assign_parts, start, **kwargs):"},{"line_number":1192,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"7f515b1d_fadfa6d3","line":1189,"in_reply_to":"7f515b1d_9300b136","updated":"2017-09-25 19:46:50.000000000","message":"+1","commit_id":"bfaa6cbc4f576f6c36f3bea7fe7b37a1a13ce4d3"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"9ed76f055fe13e40f6ababde6805574151a7814e","unresolved":false,"context_lines":[{"line_number":1146,"context_line":"                       for c in tier2children[t]"},{"line_number":1147,"context_line":"                       if c not in dev[\u0027tiers\u0027]) \u003c\u003d 0:"},{"line_number":1148,"context_line":"                    # we\u0027re stuck by weight"},{"line_number":1149,"context_line":"                    continue"},{"line_number":1150,"context_line":"                # this is the most overweight_device holding a replica"},{"line_number":1151,"context_line":"                # of this part that can shed it according to the plan"},{"line_number":1152,"context_line":"                dev[\u0027parts_wanted\u0027] +\u003d 1"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f515b1d_a606ad85","line":1149,"updated":"2017-09-26 02:41:47.000000000","message":"OK, the new assertion totally makes me sense here. if we don\u0027t skip the devices w/ no any wanted device under the tier, this device may be prior  device than others because parts_wanted will be increased when the device gives away the part. Hence, unfortunately, the gathered part can be returned back to the same device :/\n\nIt sounds great technique to prevent the situation. It\u0027s very nice!","commit_id":"23219664564d1b5a7ba02bbf8309ec699ab7a4cb"}],"test/unit/common/ring/test_builder.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"07411d06d5106d9547611b2ab5f7098178ba1c09","unresolved":false,"context_lines":[{"line_number":2493,"context_line":"        self.assertGreaterEqual(rb.get_balance(), 0)"},{"line_number":2494,"context_line":"        self.assertLess(rb.get_balance(), 1)"},{"line_number":2495,"context_line":"        # dispersion doesn\u0027t get any worse"},{"line_number":2496,"context_line":"        self.assertEqual(rb.dispersion, 59.765625)"},{"line_number":2497,"context_line":""},{"line_number":2498,"context_line":"    def test_effective_overload(self):"},{"line_number":2499,"context_line":"        rb \u003d ring.RingBuilder(8, 3, 1)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f2577a7_a4bfcfce","line":2496,"updated":"2017-09-12 20:00:32.000000000","message":"this test is entirely Kota\u0027s lifted from the related change.  This test is more valuable than the fix IMHO since it demonstrates *why* the existing code _must_ change.","commit_id":"9e72c769ecc07cc3310d65eb6e4481a28c8da9dc"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"214b22723fef3dd1f62a4fb6702d6ecded8d047a","unresolved":false,"context_lines":[{"line_number":2453,"context_line":"    def test_undispersable_zone_converge_on_balance(self):"},{"line_number":2454,"context_line":"        rb \u003d ring.RingBuilder(8, 6, 0)"},{"line_number":2455,"context_line":"        dev_id \u003d 0"},{"line_number":2456,"context_line":"        # 3 regions, 2 zone for each region, 1 server and device for each zone"},{"line_number":2457,"context_line":"        for r in range(3):"},{"line_number":2458,"context_line":"            for z in range(2):"},{"line_number":2459,"context_line":"                ip \u003d \u0027127.%s.%s.1\u0027 % (r, z)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f515b1d_7f81684a","line":2456,"range":{"start_line":2456,"start_character":58,"end_line":2456,"end_character":64},"updated":"2017-09-25 18:59:58.000000000","message":"2 devices, currently","commit_id":"bfaa6cbc4f576f6c36f3bea7fe7b37a1a13ce4d3"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"a4b404c0fbc00544a7fcf8de6ac32d422cb24d1b","unresolved":false,"context_lines":[{"line_number":2453,"context_line":"    def test_undispersable_zone_converge_on_balance(self):"},{"line_number":2454,"context_line":"        rb \u003d ring.RingBuilder(8, 6, 0)"},{"line_number":2455,"context_line":"        dev_id \u003d 0"},{"line_number":2456,"context_line":"        # 3 regions, 2 zone for each region, 1 server and device for each zone"},{"line_number":2457,"context_line":"        for r in range(3):"},{"line_number":2458,"context_line":"            for z in range(2):"},{"line_number":2459,"context_line":"                ip \u003d \u0027127.%s.%s.1\u0027 % (r, z)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f515b1d_5ab23a96","line":2456,"range":{"start_line":2456,"start_character":58,"end_line":2456,"end_character":64},"in_reply_to":"7f515b1d_7f81684a","updated":"2017-09-25 19:46:50.000000000","message":"Changing this test to only 1 device per server resulted in an unbalanceable ring when I removed the code block that did a check for weight.","commit_id":"bfaa6cbc4f576f6c36f3bea7fe7b37a1a13ce4d3"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"9ed76f055fe13e40f6ababde6805574151a7814e","unresolved":false,"context_lines":[{"line_number":2492,"context_line":"        # seeds given some specific ring state will randomly pick bad"},{"line_number":2493,"context_line":"        # part-replicas that end up going back down onto the same devices"},{"line_number":2494,"context_line":"        changed_part, _, _ \u003d rb.rebalance(seed\u003d7)"},{"line_number":2495,"context_line":"        self.assertEqual(changed_part, 14)"},{"line_number":2496,"context_line":"        # ... this isn\u0027t a really \"desirable\" behavior, but even with bad luck,"},{"line_number":2497,"context_line":"        # things do get better"},{"line_number":2498,"context_line":"        self.assertEqual(rb.get_balance(), 47.265625)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f515b1d_06aa21d1","line":2495,"updated":"2017-09-26 02:41:47.000000000","message":"nice, I can see changed_part was 2 less than 14 if the code commented out. that prevents such unfortunate part grabbing.","commit_id":"23219664564d1b5a7ba02bbf8309ec699ab7a4cb"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"5026da463a8da713cff5b9f21069332082db6ff7","unresolved":false,"context_lines":[{"line_number":2492,"context_line":"        # seeds given some specific ring state will randomly pick bad"},{"line_number":2493,"context_line":"        # part-replicas that end up going back down onto the same devices"},{"line_number":2494,"context_line":"        changed_part, _, _ \u003d rb.rebalance(seed\u003d7)"},{"line_number":2495,"context_line":"        self.assertEqual(changed_part, 14)"},{"line_number":2496,"context_line":"        # ... this isn\u0027t a really \"desirable\" behavior, but even with bad luck,"},{"line_number":2497,"context_line":"        # things do get better"},{"line_number":2498,"context_line":"        self.assertEqual(rb.get_balance(), 47.265625)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f515b1d_3a55171e","line":2495,"in_reply_to":"7f515b1d_06aa21d1","updated":"2017-09-26 18:57:44.000000000","message":"Interesting... dropping the random seed, I see this going anywhere from 3 to 254... but balance *definitely* improves and dispersion is *always* stuck","commit_id":"23219664564d1b5a7ba02bbf8309ec699ab7a4cb"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"5026da463a8da713cff5b9f21069332082db6ff7","unresolved":false,"context_lines":[{"line_number":2500,"context_line":""},{"line_number":2501,"context_line":"        # but if you stick with it, eventually the next rebalance, will get to"},{"line_number":2502,"context_line":"        # move \"the right\" part-replicas, resulting in near optimal balance"},{"line_number":2503,"context_line":"        changed_part, _, _ \u003d rb.rebalance(seed\u003d7)"},{"line_number":2504,"context_line":"        self.assertEqual(changed_part, 240)"},{"line_number":2505,"context_line":"        self.assertEqual(rb.get_balance(), 0.390625)"},{"line_number":2506,"context_line":"        self.assertEqual(rb.dispersion, 99.609375)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f515b1d_7565e0e0","line":2503,"updated":"2017-09-26 18:57:44.000000000","message":"And removing *both* seeds we get to this balance some 70+% of the time. Even when we don\u0027t, we continue making progress.","commit_id":"23219664564d1b5a7ba02bbf8309ec699ab7a4cb"}],"test/unit/common/ring/test_composite_builder.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"07411d06d5106d9547611b2ab5f7098178ba1c09","unresolved":false,"context_lines":[{"line_number":1115,"context_line":"                rb1.rebalance()"},{"line_number":1116,"context_line":"        self.assertEqual([rb1], update_calls)"},{"line_number":1117,"context_line":"        self.assertEqual([rb1], can_part_move_calls.keys())"},{"line_number":1118,"context_line":"        self.assertEqual(768, len(can_part_move_calls[rb1]))"},{"line_number":1119,"context_line":""},{"line_number":1120,"context_line":"        # two component builders with same parent builder"},{"line_number":1121,"context_line":"        cb \u003d CompositeRingBuilder()"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f2577a7_44226b54","line":1118,"updated":"2017-09-12 20:00:32.000000000","message":"so the original code would do the _gather_parts_for_balance_can_disperse once and hit each 256 parts, then again (total 512) and since nothing changed - stop.\n\nThis one will do _gather_parts_for_balance_can_disperse once, then _gather_parts_for_balance_forced, hitting each of the 256 parts twice, then _gather_parts_for_balance_forced again in the second pass (total 768) and since nothing changed - stop.","commit_id":"9e72c769ecc07cc3310d65eb6e4481a28c8da9dc"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"07cc84cce2626a175a5fa61ce2835330d5dbf2c0","unresolved":false,"context_lines":[{"line_number":1115,"context_line":"                rb1.rebalance()"},{"line_number":1116,"context_line":"        self.assertEqual([rb1], update_calls)"},{"line_number":1117,"context_line":"        self.assertEqual([rb1], can_part_move_calls.keys())"},{"line_number":1118,"context_line":"        self.assertEqual(768, len(can_part_move_calls[rb1]))"},{"line_number":1119,"context_line":""},{"line_number":1120,"context_line":"        # two component builders with same parent builder"},{"line_number":1121,"context_line":"        cb \u003d CompositeRingBuilder()"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f515b1d_69e66447","line":1118,"updated":"2017-09-25 12:03:52.000000000","message":"Make sense for the worth comment at https://review.openstack.org/#/c/503152/2/test/unit/common/ring/test_composite_builder.py@1118","commit_id":"bfaa6cbc4f576f6c36f3bea7fe7b37a1a13ce4d3"}],"test/unit/common/ring/test_utils.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"07411d06d5106d9547611b2ab5f7098178ba1c09","unresolved":false,"context_lines":[{"line_number":622,"context_line":"        self.assertEqual(rb.dispersion, 55.46875)"},{"line_number":623,"context_line":"        report \u003d dispersion_report(rb)"},{"line_number":624,"context_line":"        self.assertEqual(report[\u0027worst_tier\u0027], \u0027r1z1\u0027)"},{"line_number":625,"context_line":"        self.assertEqual(report[\u0027max_dispersion\u0027], 44.921875)"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":"        def build_tier_report(max_replicas, placed_parts, dispersion,"},{"line_number":628,"context_line":"                              replicas):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f2577a7_04ca236c","line":625,"updated":"2017-09-12 20:00:32.000000000","message":"here we see the new algorithm getter better/faster at trading dispersion for balance.","commit_id":"9e72c769ecc07cc3310d65eb6e4481a28c8da9dc"}]}
