)]}'
{"swift/container/sharder.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4de52e11e515d193d0d31ce604010f226f2b55be","unresolved":true,"context_lines":[{"line_number":104,"context_line":"    Find all pairs of overlapping ranges in the given list."},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    :param shard_ranges: A list of :class:`~swift.utils.ShardRange`"},{"line_number":107,"context_line":"    :return: a set of tuples, each tuple containing ranges that overlap with"},{"line_number":108,"context_line":"        each other."},{"line_number":109,"context_line":"    \"\"\""},{"line_number":110,"context_line":"    result \u003d set()"},{"line_number":111,"context_line":"    for shard_range in shard_ranges:"}],"source_content_type":"text/x-python","patch_set":1,"id":"b435e191_eae58696","line":108,"range":{"start_line":107,"start_character":13,"end_line":108,"end_character":18},"updated":"2021-01-27 12:07:47.000000000","message":"this is inconsistent with the summary that says it finds pairs","commit_id":"dd997fe526cfae1ce6da1cf79997367a1fdabdd9"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4de52e11e515d193d0d31ce604010f226f2b55be","unresolved":true,"context_lines":[{"line_number":110,"context_line":"    result \u003d set()"},{"line_number":111,"context_line":"    for shard_range in shard_ranges:"},{"line_number":112,"context_line":"        overlapping \u003d [sr for sr in shard_ranges"},{"line_number":113,"context_line":"                       if shard_range !\u003d sr and shard_range.overlaps(sr)]"},{"line_number":114,"context_line":"        if overlapping:"},{"line_number":115,"context_line":"            overlapping.append(shard_range)"},{"line_number":116,"context_line":"            overlapping.sort(key\u003dattrgetter(\"lower\", \"upper\"))"}],"source_content_type":"text/x-python","patch_set":1,"id":"2c259e43_b85510c7","line":113,"range":{"start_line":113,"start_character":38,"end_line":113,"end_character":41},"updated":"2021-01-27 12:07:47.000000000","message":"this needs to be \u0027is not\u0027 - ShardRange equality is based only on bounds (which may be *wrong* but is another issue!) - and we could have 2 shards with same bounds but created at different times with different names","commit_id":"dd997fe526cfae1ce6da1cf79997367a1fdabdd9"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4de52e11e515d193d0d31ce604010f226f2b55be","unresolved":true,"context_lines":[{"line_number":113,"context_line":"                       if shard_range !\u003d sr and shard_range.overlaps(sr)]"},{"line_number":114,"context_line":"        if overlapping:"},{"line_number":115,"context_line":"            overlapping.append(shard_range)"},{"line_number":116,"context_line":"            overlapping.sort(key\u003dattrgetter(\"lower\", \"upper\"))"},{"line_number":117,"context_line":"            result.add(tuple(overlapping))"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    return result"}],"source_content_type":"text/x-python","patch_set":1,"id":"fab1dd1d_8e8b6d8d","line":116,"updated":"2021-01-27 12:07:47.000000000","message":"sorting by name might be safer since some overlaps may have same bounds","commit_id":"dd997fe526cfae1ce6da1cf79997367a1fdabdd9"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"b80701bcc73b26416fe849936924d02b659e90d5","unresolved":true,"context_lines":[{"line_number":113,"context_line":"                       if shard_range !\u003d sr and shard_range.overlaps(sr)]"},{"line_number":114,"context_line":"        if overlapping:"},{"line_number":115,"context_line":"            overlapping.append(shard_range)"},{"line_number":116,"context_line":"            overlapping.sort(key\u003dattrgetter(\"lower\", \"upper\"))"},{"line_number":117,"context_line":"            result.add(tuple(overlapping))"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    return result"}],"source_content_type":"text/x-python","patch_set":1,"id":"f5215fb6_4588cca4","line":116,"in_reply_to":"fab1dd1d_8e8b6d8d","updated":"2021-01-28 01:09:10.000000000","message":"good point, I thought about that and then convinced myself it was ok because ShardRange.__eq__ only uses upper and lower.. but yeah your right, we seen this in prod, so it definitely could happen.","commit_id":"dd997fe526cfae1ce6da1cf79997367a1fdabdd9"}],"test/unit/container/test_sharder.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4de52e11e515d193d0d31ce604010f226f2b55be","unresolved":true,"context_lines":[{"line_number":5617,"context_line":"            self.assertEqual(1, len(find_overlapping_ranges(shard_ranges)))"},{"line_number":5618,"context_line":""},{"line_number":5619,"context_line":"        for bounds in [((\u0027a\u0027, \u0027j\u0027), (\u0027k\u0027, \u0027t\u0027), (\u0027s\u0027, \u0027z\u0027)),"},{"line_number":5620,"context_line":"                       ((\u0027a\u0027, \u0027j\u0027), (\u0027k\u0027, \u0027t\u0027), (\u0027l\u0027, \u0027u\u0027), (\u0027s\u0027, \u0027z\u0027)),"},{"line_number":5621,"context_line":"                       ((\u0027a\u0027, \u0027j\u0027), (\u0027k\u0027, \u0027t\u0027), (\u0027k\u0027, \u0027u\u0027), (\u0027s\u0027, \u0027z\u0027))]:"},{"line_number":5622,"context_line":"            do_test(bounds)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9541689e_1f3dead8","line":5620,"updated":"2021-01-27 12:07:47.000000000","message":"ok, this is 1 overlapping tuple (k,t) (l,u) and (s,z) all overlap with each other","commit_id":"dd997fe526cfae1ce6da1cf79997367a1fdabdd9"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"b80701bcc73b26416fe849936924d02b659e90d5","unresolved":true,"context_lines":[{"line_number":5617,"context_line":"            self.assertEqual(1, len(find_overlapping_ranges(shard_ranges)))"},{"line_number":5618,"context_line":""},{"line_number":5619,"context_line":"        for bounds in [((\u0027a\u0027, \u0027j\u0027), (\u0027k\u0027, \u0027t\u0027), (\u0027s\u0027, \u0027z\u0027)),"},{"line_number":5620,"context_line":"                       ((\u0027a\u0027, \u0027j\u0027), (\u0027k\u0027, \u0027t\u0027), (\u0027l\u0027, \u0027u\u0027), (\u0027s\u0027, \u0027z\u0027)),"},{"line_number":5621,"context_line":"                       ((\u0027a\u0027, \u0027j\u0027), (\u0027k\u0027, \u0027t\u0027), (\u0027k\u0027, \u0027u\u0027), (\u0027s\u0027, \u0027z\u0027))]:"},{"line_number":5622,"context_line":"            do_test(bounds)"}],"source_content_type":"text/x-python","patch_set":1,"id":"b825a167_bf12391e","line":5620,"in_reply_to":"9541689e_1f3dead8","updated":"2021-01-28 01:09:10.000000000","message":"Yeah I\u0027ll add some comments.","commit_id":"dd997fe526cfae1ce6da1cf79997367a1fdabdd9"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4de52e11e515d193d0d31ce604010f226f2b55be","unresolved":true,"context_lines":[{"line_number":5619,"context_line":"        for bounds in [((\u0027a\u0027, \u0027j\u0027), (\u0027k\u0027, \u0027t\u0027), (\u0027s\u0027, \u0027z\u0027)),"},{"line_number":5620,"context_line":"                       ((\u0027a\u0027, \u0027j\u0027), (\u0027k\u0027, \u0027t\u0027), (\u0027l\u0027, \u0027u\u0027), (\u0027s\u0027, \u0027z\u0027)),"},{"line_number":5621,"context_line":"                       ((\u0027a\u0027, \u0027j\u0027), (\u0027k\u0027, \u0027t\u0027), (\u0027k\u0027, \u0027u\u0027), (\u0027s\u0027, \u0027z\u0027))]:"},{"line_number":5622,"context_line":"            do_test(bounds)"}],"source_content_type":"text/x-python","patch_set":1,"id":"8cd6956a_b2bf51cf","line":5622,"updated":"2021-01-27 12:07:47.000000000","message":"adding these bounds (\u0027a\u0027, \u0027k\u0027), (\u0027j\u0027, \u0027t\u0027), (\u0027s\u0027, \u0027z\u0027) and test fails saying there are 3 overlaps but there are only 2\n\nadding (\u0027a\u0027,\u0027z\u0027), (\u0027a\u0027,\u0027z\u0027) and test fails saying there are no overlaps","commit_id":"dd997fe526cfae1ce6da1cf79997367a1fdabdd9"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"914a8f3f1c8a91699463e7c46e1ebf3b3fcb30bc","unresolved":true,"context_lines":[{"line_number":5619,"context_line":"        for bounds in [((\u0027a\u0027, \u0027j\u0027), (\u0027k\u0027, \u0027t\u0027), (\u0027s\u0027, \u0027z\u0027)),"},{"line_number":5620,"context_line":"                       ((\u0027a\u0027, \u0027j\u0027), (\u0027k\u0027, \u0027t\u0027), (\u0027l\u0027, \u0027u\u0027), (\u0027s\u0027, \u0027z\u0027)),"},{"line_number":5621,"context_line":"                       ((\u0027a\u0027, \u0027j\u0027), (\u0027k\u0027, \u0027t\u0027), (\u0027k\u0027, \u0027u\u0027), (\u0027s\u0027, \u0027z\u0027))]:"},{"line_number":5622,"context_line":"            do_test(bounds)"}],"source_content_type":"text/x-python","patch_set":1,"id":"975e9db5_cc3841be","line":5622,"in_reply_to":"04e7a1fc_b779189b","updated":"2021-01-28 02:32:59.000000000","message":"The question is what is the right answer for this set you mentioned: \n\n     (\u0027a\u0027, \u0027k\u0027), (\u0027j\u0027, \u0027t\u0027), (\u0027s\u0027, \u0027z\u0027)\n\nYou can look at it as 2:\n  a-k, j-t and j-t, s-z\n\nBut really j-t really overlaps a-k and s-z, and in the code we check each shard range with each other.. so when we check j-t it correctly returns, yeah I overlap with the other 2. Thus we get 3.","commit_id":"dd997fe526cfae1ce6da1cf79997367a1fdabdd9"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"b80701bcc73b26416fe849936924d02b659e90d5","unresolved":true,"context_lines":[{"line_number":5619,"context_line":"        for bounds in [((\u0027a\u0027, \u0027j\u0027), (\u0027k\u0027, \u0027t\u0027), (\u0027s\u0027, \u0027z\u0027)),"},{"line_number":5620,"context_line":"                       ((\u0027a\u0027, \u0027j\u0027), (\u0027k\u0027, \u0027t\u0027), (\u0027l\u0027, \u0027u\u0027), (\u0027s\u0027, \u0027z\u0027)),"},{"line_number":5621,"context_line":"                       ((\u0027a\u0027, \u0027j\u0027), (\u0027k\u0027, \u0027t\u0027), (\u0027k\u0027, \u0027u\u0027), (\u0027s\u0027, \u0027z\u0027))]:"},{"line_number":5622,"context_line":"            do_test(bounds)"}],"source_content_type":"text/x-python","patch_set":1,"id":"04e7a1fc_b779189b","line":5622,"in_reply_to":"8cd6956a_b2bf51cf","updated":"2021-01-28 01:09:10.000000000","message":"Oh nice, thanks :)","commit_id":"dd997fe526cfae1ce6da1cf79997367a1fdabdd9"}]}
