)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"3ca346ee78f68e95143054c0c66f331573217afb","unresolved":false,"context_lines":[{"line_number":9,"context_line":"There are cases where a rebalance improves dispersion, but doesn\u0027t"},{"line_number":10,"context_line":"improve balance. This is because the balance of a ring builder is"},{"line_number":11,"context_line":"taken to be the balance of its least-balanced device, so if there\u0027s a"},{"line_number":12,"context_line":"device that has no partitions, wants some, but can\u0027t get them, then"},{"line_number":13,"context_line":"we\u0027ll never save the ring builder even if every other device in the"},{"line_number":14,"context_line":"ring got better."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"df87a7cf_73a17546","line":12,"range":{"start_line":12,"start_character":0,"end_line":12,"end_character":61},"updated":"2017-12-15 17:35:32.000000000","message":"This still seems like a core problem :-(\n\nI guess the idea is that we have to do this *other* dispersion-reducing work *first*, and we\u0027ll come back to filling that device later? Could we redefine balance such that we could ignore some newly-added devices that couldn\u0027t get parts?\n\nAlternatively -- in the new test, there are a whole bunch of devices whose balance dramatically improved -- maybe we should consider some aggregate of the single least-balanced device, the fifth-percentile of worst balances, and the mean balance?","commit_id":"27e3eaf577f2f47a0592448a043d3ddedca39776"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b7958c91685c750a9dcf5dd1e0dfef1f275e8014","unresolved":false,"context_lines":[{"line_number":9,"context_line":"There are cases where a rebalance improves dispersion, but doesn\u0027t"},{"line_number":10,"context_line":"improve balance. This is because the balance of a ring builder is"},{"line_number":11,"context_line":"taken to be the balance of its least-balanced device, so if there\u0027s a"},{"line_number":12,"context_line":"device that has no partitions, wants some, but can\u0027t get them, then"},{"line_number":13,"context_line":"we\u0027ll never save the ring builder even if every other device in the"},{"line_number":14,"context_line":"ring got better."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"df87a7cf_c6751dfc","line":12,"range":{"start_line":12,"start_character":0,"end_line":12,"end_character":61},"in_reply_to":"df87a7cf_73a17546","updated":"2017-12-15 18:14:32.000000000","message":"Preferring to move parts that will improve dispersion is a design decision in the rebalance code that is correct as we\u0027ve defined it.  We could certainly revisit that orthogonally to this change.  I\u0027m going to assume this comment is thinking out loud commentary.","commit_id":"27e3eaf577f2f47a0592448a043d3ddedca39776"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c5e8741b8d131bd1807f5a8afb7127fade5f3efa","unresolved":false,"context_lines":[{"line_number":9,"context_line":"There are cases where a rebalance improves dispersion, but doesn\u0027t"},{"line_number":10,"context_line":"improve balance. This is because the balance of a ring builder is"},{"line_number":11,"context_line":"taken to be the balance of its least-balanced device, so if there\u0027s a"},{"line_number":12,"context_line":"device that has no partitions, wants some, but can\u0027t get them, then"},{"line_number":13,"context_line":"we\u0027ll never save the ring builder even if every other device in the"},{"line_number":14,"context_line":"ring got better."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"df87a7cf_6937424f","line":12,"range":{"start_line":12,"start_character":0,"end_line":12,"end_character":61},"in_reply_to":"df87a7cf_c6751dfc","updated":"2017-12-15 18:46:28.000000000","message":"Yeah, totally thinking out loud. I\u0027m not actually suggesting that we should prioritize filling the guy that doesn\u0027t help dispersion -- but I *do* wonder if it might be useful to redefine \"balance\" to take a more-holistic view, similar to the follow-on that redefines \"dispersion\".","commit_id":"27e3eaf577f2f47a0592448a043d3ddedca39776"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"3ca346ee78f68e95143054c0c66f331573217afb","unresolved":false,"context_lines":[{"line_number":13,"context_line":"we\u0027ll never save the ring builder even if every other device in the"},{"line_number":14,"context_line":"ring got better."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"We can detect this situation by looking at the dispersion number; if"},{"line_number":17,"context_line":"it improves, then the new ring is better than the old one, so let\u0027s"},{"line_number":18,"context_line":"save it anyway."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Partial-Bug: #1697543"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"df87a7cf_f3c34556","line":17,"range":{"start_line":16,"start_character":66,"end_line":17,"end_character":11},"updated":"2017-12-15 17:35:32.000000000","message":"We aren\u0027t actually checking for improvement...","commit_id":"27e3eaf577f2f47a0592448a043d3ddedca39776"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b7958c91685c750a9dcf5dd1e0dfef1f275e8014","unresolved":false,"context_lines":[{"line_number":13,"context_line":"we\u0027ll never save the ring builder even if every other device in the"},{"line_number":14,"context_line":"ring got better."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"We can detect this situation by looking at the dispersion number; if"},{"line_number":17,"context_line":"it improves, then the new ring is better than the old one, so let\u0027s"},{"line_number":18,"context_line":"save it anyway."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Partial-Bug: #1697543"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"df87a7cf_c64e7dc0","line":17,"range":{"start_line":16,"start_character":66,"end_line":17,"end_character":11},"in_reply_to":"df87a7cf_f3c34556","updated":"2017-12-15 18:14:32.000000000","message":"todo: reword this as changed.","commit_id":"27e3eaf577f2f47a0592448a043d3ddedca39776"}],"swift/cli/ringbuilder.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5554c14d0140d5dccb59f2136608e48c025364fd","unresolved":false,"context_lines":[{"line_number":863,"context_line":"            last_balance \u003d builder.get_balance()"},{"line_number":864,"context_line":"            last_dispersion \u003d builder.dispersion"},{"line_number":865,"context_line":"            parts, balance, removed_devs \u003d builder.rebalance(seed\u003dget_seed(3))"},{"line_number":866,"context_line":"            dispersion \u003d builder.dispersion"},{"line_number":867,"context_line":"        except exceptions.RingBuilderError as e:"},{"line_number":868,"context_line":"            print(\u0027-\u0027 * 79)"},{"line_number":869,"context_line":"            print(\"An error has occurred during ring validation. Common\\n\""}],"source_content_type":"text/x-python","patch_set":2,"id":"3f1d235d_e1bbbfe2","line":866,"updated":"2017-06-29 20:17:04.000000000","message":"sure...","commit_id":"67901a9acba579b708ad628a76bda3362e433347"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5554c14d0140d5dccb59f2136608e48c025364fd","unresolved":false,"context_lines":[{"line_number":887,"context_line":"        # special value(MAX_BALANCE) until zero weighted device return all"},{"line_number":888,"context_line":"        # its partitions. So we cannot check balance has changed."},{"line_number":889,"context_line":"        # Thus we need to check balance or last_balance is special value."},{"line_number":890,"context_line":"        be_cowardly \u003d True"},{"line_number":891,"context_line":"        if options.force:"},{"line_number":892,"context_line":"            # User said save it, so we save it."},{"line_number":893,"context_line":"            be_cowardly \u003d False"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f1d235d_c1d7a323","line":890,"updated":"2017-06-29 20:17:04.000000000","message":"lol","commit_id":"67901a9acba579b708ad628a76bda3362e433347"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5554c14d0140d5dccb59f2136608e48c025364fd","unresolved":false,"context_lines":[{"line_number":901,"context_line":"            balance_changed \u003d ("},{"line_number":902,"context_line":"                abs(last_balance - balance) \u003e\u003d 1 or"},{"line_number":903,"context_line":"                (last_balance \u003d\u003d MAX_BALANCE and balance \u003d\u003d MAX_BALANCE))"},{"line_number":904,"context_line":"            dispersion_changed \u003d (dispersion !\u003d last_dispersion)"},{"line_number":905,"context_line":"            if balance_changed or dispersion_changed:"},{"line_number":906,"context_line":"                be_cowardly \u003d False"},{"line_number":907,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3f1d235d_c1a563b7","line":904,"updated":"2017-06-29 20:17:04.000000000","message":"I think this could potentially be a delta situation... not that I experience dispersion getting worse or only changing by a little... i just worry if this means we only be_cowardly for rings that essentially have perfect dispersion... I mean... this is a *float* :\\","commit_id":"67901a9acba579b708ad628a76bda3362e433347"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"31d6e4c65b0495094573a5d6fda491b97201ff4c","unresolved":false,"context_lines":[{"line_number":901,"context_line":"            balance_changed \u003d ("},{"line_number":902,"context_line":"                abs(last_balance - balance) \u003e\u003d 1 or"},{"line_number":903,"context_line":"                (last_balance \u003d\u003d MAX_BALANCE and balance \u003d\u003d MAX_BALANCE))"},{"line_number":904,"context_line":"            dispersion_changed \u003d (dispersion !\u003d last_dispersion)"},{"line_number":905,"context_line":"            if balance_changed or dispersion_changed:"},{"line_number":906,"context_line":"                be_cowardly \u003d False"},{"line_number":907,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3f1d235d_3270e372","line":904,"in_reply_to":"3f1d235d_c1a563b7","updated":"2017-06-29 21:34:06.000000000","message":"Easy enough to change. Do you have a suggested value for minimum difference? I don\u0027t even know what the range is for dispersion values.","commit_id":"67901a9acba579b708ad628a76bda3362e433347"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"56d8ad44736fe64d50a48b0ad08b62c6457c4836","unresolved":false,"context_lines":[{"line_number":901,"context_line":"            balance_changed \u003d ("},{"line_number":902,"context_line":"                abs(last_balance - balance) \u003e\u003d 1 or"},{"line_number":903,"context_line":"                (last_balance \u003d\u003d MAX_BALANCE and balance \u003d\u003d MAX_BALANCE))"},{"line_number":904,"context_line":"            dispersion_changed \u003d (dispersion !\u003d last_dispersion)"},{"line_number":905,"context_line":"            if balance_changed or dispersion_changed:"},{"line_number":906,"context_line":"                be_cowardly \u003d False"},{"line_number":907,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_623df2c2","line":904,"updated":"2017-08-15 03:35:46.000000000","message":"What\u0027s the order of magnitude by which we expect dispersion to change? In particular, why do we treat dispersion so differently from balance?\n\nSeparately, why do we *still continue* and save even if balance is roughly the same and dispersion has gotten *worse*? Arguably, that\u0027s the sort of situation where we should raise an error -- things got worse and there\u0027s every indication no real indication that things will be any *better* on the next go-round.","commit_id":"ee45cc4d3d0b8650cbe2b2cb9444374422092fb9"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"3ca346ee78f68e95143054c0c66f331573217afb","unresolved":false,"context_lines":[{"line_number":924,"context_line":"        # special value(MAX_BALANCE) until zero weighted device return all"},{"line_number":925,"context_line":"        # its partitions. So we cannot check balance has changed."},{"line_number":926,"context_line":"        # Thus we need to check balance or last_balance is special value."},{"line_number":927,"context_line":"        be_cowardly \u003d True"},{"line_number":928,"context_line":"        if options.force:"},{"line_number":929,"context_line":"            # User said save it, so we save it."},{"line_number":930,"context_line":"            be_cowardly \u003d False"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_b805a87c","line":927,"updated":"2017-12-15 17:35:32.000000000","message":"This is probably right, but I feel fundamentally opposed to the idea that our default behavior ought to be \"be cowardly\" :P","commit_id":"27e3eaf577f2f47a0592448a043d3ddedca39776"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"3ca346ee78f68e95143054c0c66f331573217afb","unresolved":false,"context_lines":[{"line_number":938,"context_line":"            balance_changed \u003d ("},{"line_number":939,"context_line":"                abs(last_balance - balance) \u003e\u003d 1 or"},{"line_number":940,"context_line":"                (last_balance \u003d\u003d MAX_BALANCE and balance \u003d\u003d MAX_BALANCE))"},{"line_number":941,"context_line":"            dispersion_changed \u003d (dispersion !\u003d last_dispersion)"},{"line_number":942,"context_line":"            if balance_changed or dispersion_changed:"},{"line_number":943,"context_line":"                be_cowardly \u003d False"},{"line_number":944,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_f847b0bb","line":941,"updated":"2017-12-15 17:35:32.000000000","message":"It still bugs me that\n\n- balance_changed is looking for some minimum delta while dispersion_changed is looking for *any* delta, no matter how small, and\n- if balance *and* dispersion both get *worse* instead of better, we move forward with that, despite not having any indication that the next rebalance will actually improve things.\n\nI\u0027ve got this niggling feeling like we might hit some rebalance loop where we get\n\n (b1, d1) -\u003e (b2, d2) -\u003e ... -\u003e (bN, dN) -\u003e (b1, d1)\n\n... with no real way out of it beyond \"wait for failures or expansions to *force* a topology change\".\n\nBut I suppose this is currently true *today*, but with just balance -- you could totally bounce back and forth between b1 and b2 provided they were more than 1 apart. (I think that may have been part of the trouble that lead to https://github.com/openstack/swift/commit/2321966...) But recent changes to the rebalance algorithm highlight that we rely on our *part-gathering mechanism* to make sure we progress, not our save criteria.\n\nStill, I wonder if it\u0027s just a matter of time before we decide that we really want\n\n abs(last_dispersion - dispersion) \u003e\u003d SOME_VAL\n\ninstead...","commit_id":"27e3eaf577f2f47a0592448a043d3ddedca39776"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"2d5c35fc5f1456550312245f01f9ca7fb81fd4b2","unresolved":false,"context_lines":[{"line_number":938,"context_line":"            balance_changed \u003d ("},{"line_number":939,"context_line":"                abs(last_balance - balance) \u003e\u003d 1 or"},{"line_number":940,"context_line":"                (last_balance \u003d\u003d MAX_BALANCE and balance \u003d\u003d MAX_BALANCE))"},{"line_number":941,"context_line":"            dispersion_changed \u003d (dispersion !\u003d last_dispersion)"},{"line_number":942,"context_line":"            if balance_changed or dispersion_changed:"},{"line_number":943,"context_line":"                be_cowardly \u003d False"},{"line_number":944,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_db3986a3","line":941,"updated":"2017-12-15 06:52:18.000000000","message":"So looking at the code. A lower dispersion is better, where:\n\n  dispersion \u003d 100.0 * parts_at_risk / self.parts\n\nIf balanced didn\u0027t change and somehow the dispersion got worse (higher) then would we want to save it?\n\nSo wouldn\u0027t this be better:\n\n  better_dispersion \u003d (dispersion \u003c last_dispersion)\n  if balance_changed or better_dispersion:\n      be_cowardly \u003d False","commit_id":"27e3eaf577f2f47a0592448a043d3ddedca39776"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b7958c91685c750a9dcf5dd1e0dfef1f275e8014","unresolved":false,"context_lines":[{"line_number":938,"context_line":"            balance_changed \u003d ("},{"line_number":939,"context_line":"                abs(last_balance - balance) \u003e\u003d 1 or"},{"line_number":940,"context_line":"                (last_balance \u003d\u003d MAX_BALANCE and balance \u003d\u003d MAX_BALANCE))"},{"line_number":941,"context_line":"            dispersion_changed \u003d (dispersion !\u003d last_dispersion)"},{"line_number":942,"context_line":"            if balance_changed or dispersion_changed:"},{"line_number":943,"context_line":"                be_cowardly \u003d False"},{"line_number":944,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_a691f948","line":941,"in_reply_to":"df87a7cf_db3986a3","updated":"2017-12-15 18:14:32.000000000","message":"i don\u0027t think *here* would be the right place to do that.\n\nI can imagine a scenario where failing devices or decom of a zone could lead to balance \u0026 dispersion both getting worse and that change being correct... dunno tho...","commit_id":"27e3eaf577f2f47a0592448a043d3ddedca39776"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b7958c91685c750a9dcf5dd1e0dfef1f275e8014","unresolved":false,"context_lines":[{"line_number":938,"context_line":"            balance_changed \u003d ("},{"line_number":939,"context_line":"                abs(last_balance - balance) \u003e\u003d 1 or"},{"line_number":940,"context_line":"                (last_balance \u003d\u003d MAX_BALANCE and balance \u003d\u003d MAX_BALANCE))"},{"line_number":941,"context_line":"            dispersion_changed \u003d (dispersion !\u003d last_dispersion)"},{"line_number":942,"context_line":"            if balance_changed or dispersion_changed:"},{"line_number":943,"context_line":"                be_cowardly \u003d False"},{"line_number":944,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_06cf857f","line":941,"in_reply_to":"df87a7cf_f847b0bb","updated":"2017-12-15 18:14:32.000000000","message":"I think this idea about balance \u0026 change both getting worse is a distraction - we\u0027ve never even considered dispersion changes as part of our save condition and it\u0027s a big problem.  I\u0027m personally not that worried about it, but if we can come up with builder change that results in that scenario - then let\u0027s open a different bug...\n\nyes, i\u0027m sure we want to do some kind of delta dispersion - I\u0027ll work on a follow up for that today.","commit_id":"27e3eaf577f2f47a0592448a043d3ddedca39776"}],"test/unit/cli/test_ringbuilder.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"56d8ad44736fe64d50a48b0ad08b62c6457c4836","unresolved":false,"context_lines":[{"line_number":1876,"context_line":"            \u0027region\u0027: 1, \u0027zone\u0027: 1,"},{"line_number":1877,"context_line":"            \u0027ip\u0027: \u002710.0.0.1\u0027, \u0027port\u0027: 20001, \u0027weight\u0027: 1000,"},{"line_number":1878,"context_line":"            \u0027device\u0027: \u0027sde\u0027})"},{"line_number":1879,"context_line":"        ring.rebalance()"},{"line_number":1880,"context_line":""},{"line_number":1881,"context_line":"        # The last guy in zone 1"},{"line_number":1882,"context_line":"        ring.add_dev({"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_c295be34","line":1879,"updated":"2017-08-15 03:35:46.000000000","message":"Big +1 for not touching seed.","commit_id":"ee45cc4d3d0b8650cbe2b2cb9444374422092fb9"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"56d8ad44736fe64d50a48b0ad08b62c6457c4836","unresolved":false,"context_lines":[{"line_number":1915,"context_line":""},{"line_number":1916,"context_line":"        # Rebalance once: this gets 1/5 replica into zone 2; the ring is"},{"line_number":1917,"context_line":"        # saved because devices changed."},{"line_number":1918,"context_line":"        argv \u003d [\"\", self.tmpfile, \"rebalance\", \"5759339\"]"},{"line_number":1919,"context_line":"        self.assertSystemExit(EXIT_WARNING, ringbuilder.main, argv)"},{"line_number":1920,"context_line":"        self.run_srb(\u0027pretend_min_part_hours_passed\u0027)"},{"line_number":1921,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_423d4e29","line":1918,"updated":"2017-08-15 03:35:46.000000000","message":"`swift-ring builder` sez:\n\n swift-ring-builder \u003cbuilder_file\u003e rebalance [options]\n    Attempts to rebalance the ring by reassigning partitions that haven\u0027t been\n    recently reassigned.\n\nso... 5759339 is... a seed? I guess? What the heck is this?\n\n(Side note: why the hell don\u0027t we support -h? It seems like I need an actual, loadable ring builder, complete with devices, before that\u0027ll have *any* effect.)\n\nOh... I guess, once I *do* have a \"real\", loadable ring builder, `-h` starts to work..\n\n Usage: swift-ring-builder \u003cbuilder_file\u003e rebalance [options]\n     Attempts to rebalance the ring by reassigning partitions that haven\u0027t been\n     recently reassigned.\n \n Options:\n   -h, --help            show this help message and exit\n   -f, --force           Force a rebalanced ring to save even if \u003c 1% of parts\n                         changed\n   -s SEED, --seed\u003dSEED  seed to use for rebalance\n   -d, --debug           print debug information\n\nso, should we have a `-s` or something?","commit_id":"ee45cc4d3d0b8650cbe2b2cb9444374422092fb9"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"56d8ad44736fe64d50a48b0ad08b62c6457c4836","unresolved":false,"context_lines":[{"line_number":1920,"context_line":"        self.run_srb(\u0027pretend_min_part_hours_passed\u0027)"},{"line_number":1921,"context_line":""},{"line_number":1922,"context_line":"        # Rebalance again: this gets 2/5 replica into zone 2, but no devices"},{"line_number":1923,"context_line":"        # changed and the balance stays the same. The only improvement is"},{"line_number":1924,"context_line":"        # dispersion."},{"line_number":1925,"context_line":"        with mock.patch(\u0027swift.common.ring.RingBuilder.save\u0027) as mock_save:"},{"line_number":1926,"context_line":"            # The warning is benign; it\u0027s just telling the user to keep on"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_025e2611","line":1923,"range":{"start_line":1923,"start_character":22,"end_line":1923,"end_character":48},"updated":"2017-08-15 03:35:46.000000000","message":"I\u0027d kinda like to see an assertion about this.","commit_id":"ee45cc4d3d0b8650cbe2b2cb9444374422092fb9"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"3ca346ee78f68e95143054c0c66f331573217afb","unresolved":false,"context_lines":[{"line_number":1918,"context_line":"        argv \u003d [\"\", self.tmpfile, \"rebalance\", \"3\"]"},{"line_number":1919,"context_line":"        with mock.patch(\u0027swift.common.ring.RingBuilder.save\u0027) as mock_save:"},{"line_number":1920,"context_line":"            self.assertSystemExit(EXIT_WARNING, ringbuilder.main, argv)"},{"line_number":1921,"context_line":"        self.assertEqual(len(mock_save.calls), 0)"},{"line_number":1922,"context_line":""},{"line_number":1923,"context_line":"    def test_rebalance_saves_dispersion_improvement(self):"},{"line_number":1924,"context_line":"        # We set up a situation where dispersion improves but balance"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_5321d19e","line":1921,"updated":"2017-12-15 17:35:32.000000000","message":"+1","commit_id":"27e3eaf577f2f47a0592448a043d3ddedca39776"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"3ca346ee78f68e95143054c0c66f331573217afb","unresolved":false,"context_lines":[{"line_number":1992,"context_line":"        self.run_srb(\u0027pretend_min_part_hours_passed\u0027)"},{"line_number":1993,"context_line":""},{"line_number":1994,"context_line":"        # Rebalance again: this gets 2/5 replica into zone 2, but no devices"},{"line_number":1995,"context_line":"        # changed and the balance stays the same. The only improvement is"},{"line_number":1996,"context_line":"        # dispersion."},{"line_number":1997,"context_line":"        with mock.patch(\u0027swift.common.ring.RingBuilder.save\u0027) as mock_save:"},{"line_number":1998,"context_line":"            # The warning is benign; it\u0027s just telling the user to keep on"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_70164b58","line":1995,"range":{"start_line":1995,"start_character":22,"end_line":1995,"end_character":48},"updated":"2017-12-15 17:35:32.000000000","message":"Check:\n\n -------------------- \u003e\u003e begin captured stdout \u003c\u003c ---------------------\n Reassigned 64 (100.00%) partitions. Balance is now 100.00.  Dispersion is now 100.00\n -------------------------------------------------------------------------------\n NOTE: Dispersion of 100.000000 indicates some parts are not\n       optimally dispersed.\n\n       You may want to adjust some device weights, increase\n       the overload or review the dispersion report.\n -------------------------------------------------------------------------------\n Reassigned 64 (100.00%) partitions. Balance is now 100.00.  Dispersion is now 0.00\n -------------------------------------------------------------------------------\n NOTE: Balance of 100.00 indicates you should push this\n       ring, wait at least 1 hours, and rebalance/repush.\n -------------------------------------------------------------------------------\n \n --------------------- \u003e\u003e end captured stdout \u003c\u003c ----------------------\n\nI kinda wish we could actually make an assertion on it without either re-opening the ringbuilder after each rebalance or re-capturing stdout and parsing the messages, though :-/","commit_id":"27e3eaf577f2f47a0592448a043d3ddedca39776"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b7958c91685c750a9dcf5dd1e0dfef1f275e8014","unresolved":false,"context_lines":[{"line_number":1992,"context_line":"        self.run_srb(\u0027pretend_min_part_hours_passed\u0027)"},{"line_number":1993,"context_line":""},{"line_number":1994,"context_line":"        # Rebalance again: this gets 2/5 replica into zone 2, but no devices"},{"line_number":1995,"context_line":"        # changed and the balance stays the same. The only improvement is"},{"line_number":1996,"context_line":"        # dispersion."},{"line_number":1997,"context_line":"        with mock.patch(\u0027swift.common.ring.RingBuilder.save\u0027) as mock_save:"},{"line_number":1998,"context_line":"            # The warning is benign; it\u0027s just telling the user to keep on"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_06030544","line":1995,"range":{"start_line":1995,"start_character":22,"end_line":1995,"end_character":48},"in_reply_to":"df87a7cf_70164b58","updated":"2017-12-15 18:14:32.000000000","message":"i think opening it form the tmpfile and checking rb.dispersion and rb.get_balance() would be fine.","commit_id":"27e3eaf577f2f47a0592448a043d3ddedca39776"}]}
