)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":20508,"name":"Mohit Motiani","email":"mohit.motiani@intel.com","username":"mohit.motiani"},"change_message_id":"d5cf2d099d69e91d2f8e69323a19be98212486d2","unresolved":false,"context_lines":[{"line_number":20,"context_line":"In order to allow only a *subset* of parts to come out of the lock at"},{"line_number":21,"context_line":"a time (so the operator can control how many parts move) the"},{"line_number":22,"context_line":"pretend_min_part_hours_passed command now accepts an optional ratio"},{"line_number":23,"context_line":"argument which can be less that 100% - it will choose the least"},{"line_number":24,"context_line":"recently moved parts and make them movable."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"This is an evolution of a previous idea to allow operators to control"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"dab17558_34c17a2f","line":23,"updated":"2016-05-09 15:19:44.000000000","message":"Typo: less than 100%","commit_id":"dfa8821215454693f7fddcd97b602efce655b309"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c2660e2adbe7eccd898319130bf6c81ecf1efa08","unresolved":false,"context_lines":[{"line_number":20,"context_line":"In order to allow only a *subset* of parts to come out of the lock at"},{"line_number":21,"context_line":"a time (so the operator can control how many parts move) the"},{"line_number":22,"context_line":"pretend_min_part_hours_passed command now accepts an optional ratio"},{"line_number":23,"context_line":"argument which can be less that 100% - it will choose the least"},{"line_number":24,"context_line":"recently moved parts and make them movable."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"This is an evolution of a previous idea to allow operators to control"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7a3c09a3_3bab2e76","line":23,"in_reply_to":"dab17558_34c17a2f","updated":"2017-01-14 00:09:55.000000000","message":"Done","commit_id":"dfa8821215454693f7fddcd97b602efce655b309"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"345149ed4d02646ac3a208fbc4fef25282c8c0fe","unresolved":false,"context_lines":[{"line_number":21,"context_line":"a time (so the operator can control how many parts move) the"},{"line_number":22,"context_line":"pretend_min_part_hours_passed command now accepts an optional ratio"},{"line_number":23,"context_line":"argument which can be less that 100% - it will choose the least"},{"line_number":24,"context_line":"recently moved parts and make them movable."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"This is an evolution of a previous idea to allow operators to control"},{"line_number":27,"context_line":"the number of parts moved per rebalance - but adapted with an eye"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7aa08908_bfea1c0d","line":24,"updated":"2016-06-08 08:07:29.000000000","message":"See my inline comment - only true if *locked hasn\u0027t been used before.","commit_id":"dfa8821215454693f7fddcd97b602efce655b309"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c2660e2adbe7eccd898319130bf6c81ecf1efa08","unresolved":false,"context_lines":[{"line_number":21,"context_line":"a time (so the operator can control how many parts move) the"},{"line_number":22,"context_line":"pretend_min_part_hours_passed command now accepts an optional ratio"},{"line_number":23,"context_line":"argument which can be less that 100% - it will choose the least"},{"line_number":24,"context_line":"recently moved parts and make them movable."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"This is an evolution of a previous idea to allow operators to control"},{"line_number":27,"context_line":"the number of parts moved per rebalance - but adapted with an eye"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7a3c09a3_9be7c2e3","line":24,"in_reply_to":"7aa08908_bfea1c0d","updated":"2017-01-14 00:09:55.000000000","message":"sure but that\u0027s because lock throws out information?  it says all parts just moved.\n\nSo if you throw out information and then say \"least recently moved\" they\u0027re all equally \"very recently moved\"\n\nI\u0027m not really sure how much documentation is appropriate here - using these tools effectively takes some pretty low level knowledge of the ring.  I\u0027d support a write playbook writeup to make these concepts more consumable by operators - but not in this commit message?\n\nIf you have a suggestion for words that better let me know.","commit_id":"dfa8821215454693f7fddcd97b602efce655b309"}],"swift/cli/ringbuilder.py":[{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"345149ed4d02646ac3a208fbc4fef25282c8c0fe","unresolved":false,"context_lines":[{"line_number":1075,"context_line":"    circumventing the min_part_hours check."},{"line_number":1076,"context_line":""},{"line_number":1077,"context_line":"    If ratio is provided and less that 1.0 (or 100%) only a subset of"},{"line_number":1078,"context_line":"    partitions will be unlocked."},{"line_number":1079,"context_line":""},{"line_number":1080,"context_line":"    *****************************"},{"line_number":1081,"context_line":"    USE THIS WITH EXTREME CAUTION"}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_0caeac80","line":1078,"updated":"2016-06-08 08:07:29.000000000","message":"typo: less that -\u003e less than\n\nWould be nice to add a comment here that this might need a \"rebalance --force\" due to bug desribed on lp.","commit_id":"dfa8821215454693f7fddcd97b602efce655b309"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c2660e2adbe7eccd898319130bf6c81ecf1efa08","unresolved":false,"context_lines":[{"line_number":1075,"context_line":"    circumventing the min_part_hours check."},{"line_number":1076,"context_line":""},{"line_number":1077,"context_line":"    If ratio is provided and less that 1.0 (or 100%) only a subset of"},{"line_number":1078,"context_line":"    partitions will be unlocked."},{"line_number":1079,"context_line":""},{"line_number":1080,"context_line":"    *****************************"},{"line_number":1081,"context_line":"    USE THIS WITH EXTREME CAUTION"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a3c09a3_bb739eb0","line":1078,"in_reply_to":"7aa08908_0caeac80","updated":"2017-01-14 00:09:55.000000000","message":"Done","commit_id":"dfa8821215454693f7fddcd97b602efce655b309"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"345149ed4d02646ac3a208fbc4fef25282c8c0fe","unresolved":false,"context_lines":[{"line_number":1085,"context_line":"    pass completes, you may introduce unavailability in your cluster. This"},{"line_number":1086,"context_line":"    has an end-user impact."},{"line_number":1087,"context_line":"        \"\"\""},{"line_number":1088,"context_line":"        if len(argv) \u003e 3:"},{"line_number":1089,"context_line":"            try:"},{"line_number":1090,"context_line":"                ratio \u003d ratio_from_arg(argv[3])"},{"line_number":1091,"context_line":"            except ValueError as e:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_c92c9604","line":1088,"updated":"2016-06-08 08:07:29.000000000","message":"I would prefer to make this explicit; there should be no option with more than 4 args, right? So this could be:\n\n if len(argv) \u003d\u003d 4:\n\nOtherwise you end up with a different behavior if one (accidentally) uses a space between the value and the percent sign. Like this:\n\n vagrant@saio:~/swift$ swift-ring-builder object.builder pretend_min_part_hours_passed 20 %\n Unlocked 256 parts\n vagrant@saio:~/swift$ swift-ring-builder object.builder pretend_min_part_hours_passed \"20 %\"\n Unlocked 51 parts","commit_id":"dfa8821215454693f7fddcd97b602efce655b309"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c2660e2adbe7eccd898319130bf6c81ecf1efa08","unresolved":false,"context_lines":[{"line_number":1085,"context_line":"    pass completes, you may introduce unavailability in your cluster. This"},{"line_number":1086,"context_line":"    has an end-user impact."},{"line_number":1087,"context_line":"        \"\"\""},{"line_number":1088,"context_line":"        if len(argv) \u003e 3:"},{"line_number":1089,"context_line":"            try:"},{"line_number":1090,"context_line":"                ratio \u003d ratio_from_arg(argv[3])"},{"line_number":1091,"context_line":"            except ValueError as e:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a3c09a3_fba0c692","line":1088,"in_reply_to":"7aa08908_c92c9604","updated":"2017-01-14 00:09:55.000000000","message":"Done","commit_id":"dfa8821215454693f7fddcd97b602efce655b309"}],"swift/common/ring/builder.py":[{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"345149ed4d02646ac3a208fbc4fef25282c8c0fe","unresolved":false,"context_lines":[{"line_number":743,"context_line":"        \"\"\""},{"line_number":744,"context_line":"        for part in range(self.parts):"},{"line_number":745,"context_line":"            self._last_part_moves[part] \u003d 0"},{"line_number":746,"context_line":"        self._last_part_moves_epoch \u003d int(time())"},{"line_number":747,"context_line":""},{"line_number":748,"context_line":"    def pretend_min_part_hours_passed(self, ratio\u003d1.0):"},{"line_number":749,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_62e2d730","line":746,"updated":"2016-06-08 08:07:29.000000000","message":"So here is an idea to still support sorting by the partition that has been moved the most hours ago:\n\n max_last_part_moves \u003d max(self._last_part_moves)\n for part in range(self.parts):\n     self._last_part_moves[part] \u003d 0\n     self._last_part_moves[part] -\u003d max_last_part_moves\n\nSo the biggest value would be 0, and all partitions that have been moved more recently have an even lower value, like -1, -2, and so on and so forth.\n\nJust an idea; it seems to pass all tests so far for me...","commit_id":"dfa8821215454693f7fddcd97b602efce655b309"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"1e98dc31a73d879f9f0af4e057e1e11db5ae1fda","unresolved":false,"context_lines":[{"line_number":743,"context_line":"        \"\"\""},{"line_number":744,"context_line":"        for part in range(self.parts):"},{"line_number":745,"context_line":"            self._last_part_moves[part] \u003d 0"},{"line_number":746,"context_line":"        self._last_part_moves_epoch \u003d int(time())"},{"line_number":747,"context_line":""},{"line_number":748,"context_line":"    def pretend_min_part_hours_passed(self, ratio\u003d1.0):"},{"line_number":749,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_a94b7158","line":746,"in_reply_to":"7aa08908_62e2d730","updated":"2016-07-08 23:25:43.000000000","message":"wouldn\u0027t they all be -max_last_part_moves, plus don\u0027t you have to do something with the epoch to even make sense of _last_part_moves (it gets \"stale\" between rebalances)\n\ndoesn\u0027t work for me because of unsigned byte array?\n\n    In [6]: rb._last_part_moves[0] \u003d -1\n    ---------------------------------------------------------------------------\n    OverflowError                             Traceback (most recent call last)\n    \u003cipython-input-6-7c5cbefaf2d7\u003e in \u003cmodule\u003e()\n    ----\u003e 1 rb._last_part_moves[0] \u003d -1\n\n    OverflowError: unsigned byte integer is less than minimum\n\nI\u0027m trying to think about your idea; I think it\u0027d be a great *enhancement* - but it seems no less \"scary\" than pretend_min_part_hours_passed - maybe less so?  ... at least on it\u0027s own.\n\npretend_min_part_hours_passed is always scary if your rebalance cycle hasn\u0027t finished - it really shouldn\u0027t be used unless rebalance is finished and you don\u0027t have any handoff parts \"in-flight\".  Something like a 100% dispersion report can help you estimate that...\n\nBut if all parts are on all it\u0027s primaries - does it matter how \"recently\" it moved?\n\nmaybe it could check last_part_moves wrt epoch and determine if you have some parts *already* locked, before locking everyone to m12s.  \n\ni.e. How long we can lock parts without disturbing the total ordering? \n\nLike, if some parts are *already* locked, then the idea would be to move everything up (backwards?) as far as we can.\n\nNo parts will move for %s hours\n\nWhere %s \u003c\u003d m12s\n\nThen assuming you plan to use pretend_m12s_passed % - you can still pick up the ones that are locked for the least amount of time first?\n\n... or something.\n\nProlly need escape hatch for \"no srly, make nothing can move for min_part_hours\" - if you just want to fail a device w/o a rebalance.\n\nGah, I don\u0027t know how any of this works.  :D","commit_id":"dfa8821215454693f7fddcd97b602efce655b309"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"345149ed4d02646ac3a208fbc4fef25282c8c0fe","unresolved":false,"context_lines":[{"line_number":753,"context_line":""},{"line_number":754,"context_line":"        :param ratio: float, the ratio of parts to reset, 1.0 is all parts, if"},{"line_number":755,"context_line":"                      less than 1.0 the parts that have moved the most hours"},{"line_number":756,"context_line":"                      ago will be reset"},{"line_number":757,"context_line":"        \"\"\""},{"line_number":758,"context_line":"        if ratio \u003e\u003d 1.0:"},{"line_number":759,"context_line":"            # all parts will change, keep simple case simple"}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_ff54a4fe","line":756,"updated":"2016-06-08 08:07:29.000000000","message":"This is only true if pretend_min_part_hours_locked didn\u0027t run before, right? Otherwise all _last_part_moves are 0, and there is no effect by sorting it.","commit_id":"dfa8821215454693f7fddcd97b602efce655b309"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c2660e2adbe7eccd898319130bf6c81ecf1efa08","unresolved":false,"context_lines":[{"line_number":753,"context_line":""},{"line_number":754,"context_line":"        :param ratio: float, the ratio of parts to reset, 1.0 is all parts, if"},{"line_number":755,"context_line":"                      less than 1.0 the parts that have moved the most hours"},{"line_number":756,"context_line":"                      ago will be reset"},{"line_number":757,"context_line":"        \"\"\""},{"line_number":758,"context_line":"        if ratio \u003e\u003d 1.0:"},{"line_number":759,"context_line":"            # all parts will change, keep simple case simple"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a3c09a3_1b2112fc","line":756,"in_reply_to":"7aa08908_ff54a4fe","updated":"2017-01-14 00:09:55.000000000","message":"yeah, after lock all parts are considered equally to have *just moved*","commit_id":"dfa8821215454693f7fddcd97b602efce655b309"}]}
