)]}'
{"swift/container/sharder.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8f5177b2626e8a469ab053badeec489b1f910b76","unresolved":true,"context_lines":[{"line_number":220,"context_line":"            return True"},{"line_number":221,"context_line":"        return False"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    def sequence_shrinking(sequence):"},{"line_number":224,"context_line":"        # check for sequence that is already shrinking"},{"line_number":225,"context_line":"        return (sequence and any([sr.state \u003d\u003d ShardRange.SHRINKING"},{"line_number":226,"context_line":"                                  for sr in sequence]))"}],"source_content_type":"text/x-python","patch_set":1,"id":"5e770d52_d9c03f79","line":223,"updated":"2021-02-28 15:47:43.000000000","message":"this is only called from one site fo not really necessary","commit_id":"c7c50b2b9d73122005c24cf6589ec85bc3c579d4"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"68b650554edaeb1fd95aed0624f113ecd8b81d63","unresolved":true,"context_lines":[{"line_number":225,"context_line":"        return (sequence and any([sr.state \u003d\u003d ShardRange.SHRINKING"},{"line_number":226,"context_line":"                                  for sr in sequence]))"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    def is_eligible(shard_range):"},{"line_number":229,"context_line":"        # found? created? sharded? don\u0027t touch it"},{"line_number":230,"context_line":"        return (shard_range.name \u003d\u003d own_shard_range.name or"},{"line_number":231,"context_line":"                shard_range.state in (ShardRange.ACTIVE,"}],"source_content_type":"text/x-python","patch_set":1,"id":"8bec7724_3563e1c2","line":228,"range":{"start_line":228,"start_character":8,"end_line":228,"end_character":19},"updated":"2021-02-26 23:41:24.000000000","message":"This is eligibility to be... included in the compactible sequence? And that\u0027s why we have to allow sr.name\u003d\u003down_sr.name, is that right?","commit_id":"c7c50b2b9d73122005c24cf6589ec85bc3c579d4"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8f5177b2626e8a469ab053badeec489b1f910b76","unresolved":true,"context_lines":[{"line_number":225,"context_line":"        return (sequence and any([sr.state \u003d\u003d ShardRange.SHRINKING"},{"line_number":226,"context_line":"                                  for sr in sequence]))"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    def is_eligible(shard_range):"},{"line_number":229,"context_line":"        # found? created? sharded? don\u0027t touch it"},{"line_number":230,"context_line":"        return (shard_range.name \u003d\u003d own_shard_range.name or"},{"line_number":231,"context_line":"                shard_range.state in (ShardRange.ACTIVE,"}],"source_content_type":"text/x-python","patch_set":1,"id":"10f46b04_f622a142","line":228,"range":{"start_line":228,"start_character":8,"end_line":228,"end_character":19},"in_reply_to":"8bec7724_3563e1c2","updated":"2021-02-28 15:47:43.000000000","message":"I think shard_range.name \u003d\u003d own_shard_range.name is redundant.\n\nHistorically, the list of shard ranges previously had own_sr appended so that it could be an acceptor, and its state would be SHARDED, so a special case was needed to consider own_sr for a sequence. That special case became part of is_eligible() in this patch. But looking back at the patch that added \u0027compact\u0027 command, that patched stopped appending own_sr to the list and dealt with the special case later:\n\nhttps://review.opendev.org/c/openstack/swift/+/765623/16/swift/container/sharder.py#198:\n\nSo we no longer expect own_sr to be in the list that is searched for compactible sequences.\n\nIn fact, removing the own_sr check makes is_eligible unnecessary too.","commit_id":"c7c50b2b9d73122005c24cf6589ec85bc3c579d4"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"68b650554edaeb1fd95aed0624f113ecd8b81d63","unresolved":true,"context_lines":[{"line_number":236,"context_line":"    expanding \u003d 0"},{"line_number":237,"context_line":"    while ((max_expanding \u003c 0 or expanding \u003c max_expanding) and"},{"line_number":238,"context_line":"           index \u003c len(shard_ranges)):"},{"line_number":239,"context_line":"        if not (is_eligible(shard_ranges[index]) and"},{"line_number":240,"context_line":"                is_shrinking_candidate("},{"line_number":241,"context_line":"                    shard_ranges[index], shrink_threshold, merge_size,"},{"line_number":242,"context_line":"                    states\u003d(ShardRange.ACTIVE, ShardRange.SHRINKING))):"}],"source_content_type":"text/x-python","patch_set":1,"id":"918f4973_850b6841","line":239,"range":{"start_line":239,"start_character":16,"end_line":239,"end_character":27},"updated":"2021-02-26 23:41:24.000000000","message":"Do we really need this part? Why isn\u0027t is_shrinking_candidate() enough? Tests pass without it, anyway.","commit_id":"c7c50b2b9d73122005c24cf6589ec85bc3c579d4"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8f5177b2626e8a469ab053badeec489b1f910b76","unresolved":true,"context_lines":[{"line_number":236,"context_line":"    expanding \u003d 0"},{"line_number":237,"context_line":"    while ((max_expanding \u003c 0 or expanding \u003c max_expanding) and"},{"line_number":238,"context_line":"           index \u003c len(shard_ranges)):"},{"line_number":239,"context_line":"        if not (is_eligible(shard_ranges[index]) and"},{"line_number":240,"context_line":"                is_shrinking_candidate("},{"line_number":241,"context_line":"                    shard_ranges[index], shrink_threshold, merge_size,"},{"line_number":242,"context_line":"                    states\u003d(ShardRange.ACTIVE, ShardRange.SHRINKING))):"}],"source_content_type":"text/x-python","patch_set":1,"id":"515c552e_4c6561ea","line":239,"range":{"start_line":239,"start_character":16,"end_line":239,"end_character":27},"in_reply_to":"918f4973_850b6841","updated":"2021-02-28 15:47:43.000000000","message":"Given the thread at line 228, I agree, is_shrinking_candidate() is sufficient","commit_id":"c7c50b2b9d73122005c24cf6589ec85bc3c579d4"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"68b650554edaeb1fd95aed0624f113ecd8b81d63","unresolved":true,"context_lines":[{"line_number":242,"context_line":"                    states\u003d(ShardRange.ACTIVE, ShardRange.SHRINKING))):"},{"line_number":243,"context_line":"            # this shard range cannot be the start of a new or existing"},{"line_number":244,"context_line":"            # compactible sequence, move on"},{"line_number":245,"context_line":"            index +\u003d 1"},{"line_number":246,"context_line":"            continue"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"        # start of a *possible* sequence"}],"source_content_type":"text/x-python","patch_set":1,"id":"1d06f1bd_8c76d381","line":245,"updated":"2021-02-26 23:41:24.000000000","message":"So this is the crux of it, yeah?","commit_id":"c7c50b2b9d73122005c24cf6589ec85bc3c579d4"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8f5177b2626e8a469ab053badeec489b1f910b76","unresolved":true,"context_lines":[{"line_number":242,"context_line":"                    states\u003d(ShardRange.ACTIVE, ShardRange.SHRINKING))):"},{"line_number":243,"context_line":"            # this shard range cannot be the start of a new or existing"},{"line_number":244,"context_line":"            # compactible sequence, move on"},{"line_number":245,"context_line":"            index +\u003d 1"},{"line_number":246,"context_line":"            continue"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"        # start of a *possible* sequence"}],"source_content_type":"text/x-python","patch_set":1,"id":"b062b7d2_5c4040aa","line":245,"in_reply_to":"1d06f1bd_8c76d381","updated":"2021-02-28 15:47:43.000000000","message":"yes, pretty much. the loop happened when the first potential shard range of a new sequence was \u003e merge_size. If it was \u003e shrink_threshold that was ok.","commit_id":"c7c50b2b9d73122005c24cf6589ec85bc3c579d4"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8f5177b2626e8a469ab053badeec489b1f910b76","unresolved":true,"context_lines":[{"line_number":269,"context_line":"            else:"},{"line_number":270,"context_line":"                break"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"        index +\u003d len(sequence)"},{"line_number":273,"context_line":"        if (index \u003d\u003d len(shard_ranges) and"},{"line_number":274,"context_line":"                not compactible_sequences and"},{"line_number":275,"context_line":"                not sequence_complete(sequence) and"}],"source_content_type":"text/x-python","patch_set":1,"id":"9b8906bf_4405372f","line":272,"updated":"2021-02-28 15:47:43.000000000","message":"this, with line 249,  is also part of the improvement i.e. sequences always get at least one member, and it\u0027s much easier to see that the index always increments.","commit_id":"c7c50b2b9d73122005c24cf6589ec85bc3c579d4"}],"test/unit/container/test_sharder.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"68b650554edaeb1fd95aed0624f113ecd8b81d63","unresolved":true,"context_lines":[{"line_number":6329,"context_line":"        sequences \u003d find_compactible_shard_sequences(broker, 10, 999, -1, -1)"},{"line_number":6330,"context_line":"        self.assertEqual([], sequences)"},{"line_number":6331,"context_line":""},{"line_number":6332,"context_line":"    def test_find_compactible_no_donors(self):"},{"line_number":6333,"context_line":"        broker \u003d self._make_broker()"},{"line_number":6334,"context_line":"        shard_ranges \u003d self._make_shard_ranges("},{"line_number":6335,"context_line":"            ((\u0027a\u0027, \u0027b\u0027), (\u0027b\u0027, \u0027c\u0027), (\u0027c\u0027, \u0027d\u0027), (\u0027d\u0027, \u0027e\u0027), (\u0027e\u0027, \u0027f\u0027),"}],"source_content_type":"text/x-python","patch_set":1,"id":"e6a3105b_f642ea3e","line":6332,"updated":"2021-02-26 23:41:24.000000000","message":"Should we start this off with a\n\n with eventlet.Timeout(30):\n     # We\u0027ve had infinite loops in find_compactible_shard_sequences\n     # before; make sure the test terminates\n     ...\n\nor something? Backing out the fix, I definitely saw the infinite loop... but I feel like a failure would\u0027ve been better.\n\nOh -- but there wouldn\u0027t be any reason to trampoline :-(","commit_id":"c7c50b2b9d73122005c24cf6589ec85bc3c579d4"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"9d0a964f98ebc3034c66416b0e65dcf216e56552","unresolved":true,"context_lines":[{"line_number":6453,"context_line":"                   ShardRange.ACTIVE, ShardRange.ACTIVE,  # ok"},{"line_number":6454,"context_line":"                   ShardRange.FOUND,  # ineligible state"},{"line_number":6455,"context_line":"                   ShardRange.SHARDED,  # ineligible state"},{"line_number":6456,"context_line":"                   ShardRange.ACTIVE, ShardRange.SHRINKING,  # ineligible state"},{"line_number":6457,"context_line":"                   ShardRange.SHARDING,  # ineligible state"},{"line_number":6458,"context_line":"                   ])"},{"line_number":6459,"context_line":"        broker.merge_shard_ranges(shard_ranges)"}],"source_content_type":"text/x-python","patch_set":2,"id":"c21a4566_bf499921","line":6456,"updated":"2021-03-01 02:14:21.000000000","message":"Oh nice, yeah because SHRINKING isn\u0027t a valid acceptor. Nice.","commit_id":"41f85f3969d854dceb1a0f6f22c377d62e7e6477"}]}
