)]}'
{"swift/container/backend.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e5afa3468d6b16e36b90bda99d2cd089126758e1","unresolved":true,"context_lines":[{"line_number":1725,"context_line":"                elif state \u003d\u003d \u0027updating\u0027:"},{"line_number":1726,"context_line":"                    resolved_states.update(SHARD_UPDATE_STATES)"},{"line_number":1727,"context_line":"                elif state \u003d\u003d \u0027auditing\u0027:"},{"line_number":1728,"context_line":"                    resolved_states.update(ShardRange.STATES.keys())"},{"line_number":1729,"context_line":"                else:"},{"line_number":1730,"context_line":"                    resolved_states.add(ShardRange.resolve_state(state)[0])"},{"line_number":1731,"context_line":"            return resolved_states"}],"source_content_type":"text/x-python","patch_set":7,"id":"8bbc5397_e2deecdc","line":1728,"updated":"2021-02-04 19:32:31.000000000","message":"Would it be better to have this as an explicit list? If the work to add ShardRange.SHRUNK had come after this, for example, what would the rolling upgrade story have looked like?","commit_id":"79a9e7459f4d9bdf621e8f075134f395aed8706c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"6b7f6a5c5aff50e036aba59c0ae23adbd1f261f1","unresolved":false,"context_lines":[{"line_number":1725,"context_line":"                elif state \u003d\u003d \u0027updating\u0027:"},{"line_number":1726,"context_line":"                    resolved_states.update(SHARD_UPDATE_STATES)"},{"line_number":1727,"context_line":"                elif state \u003d\u003d \u0027auditing\u0027:"},{"line_number":1728,"context_line":"                    resolved_states.update(ShardRange.STATES.keys())"},{"line_number":1729,"context_line":"                else:"},{"line_number":1730,"context_line":"                    resolved_states.add(ShardRange.resolve_state(state)[0])"},{"line_number":1731,"context_line":"            return resolved_states"}],"source_content_type":"text/x-python","patch_set":7,"id":"28902e3a_b2f0e131","line":1728,"in_reply_to":"8bbc5397_e2deecdc","updated":"2021-02-05 11:43:11.000000000","message":"I agree! in fact, I just expected to be dinged for explicitly listing *all* the states if I had done that :) \n\nI\u0027m going to squash https://review.opendev.org/c/openstack/swift/+/774088 which takes care of it.","commit_id":"79a9e7459f4d9bdf621e8f075134f395aed8706c"}],"swift/container/server.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"849a3b270b51358433cda2f44d10b175a844736b","unresolved":true,"context_lines":[{"line_number":766,"context_line":"            container_list \u003d broker.get_shard_ranges("},{"line_number":767,"context_line":"                marker, end_marker, includes, reverse, states\u003dstates,"},{"line_number":768,"context_line":"                include_deleted\u003dinclude_deleted, fill_gaps\u003dfill_gaps,"},{"line_number":769,"context_line":"                include_own\u003dinclude_own)"},{"line_number":770,"context_line":"        else:"},{"line_number":771,"context_line":"            resp_headers \u003d gen_resp_headers(info, is_deleted\u003dis_deleted)"},{"line_number":772,"context_line":"            if is_deleted:"}],"source_content_type":"text/x-python","patch_set":5,"id":"38454626_2d9d567a","line":769,"updated":"2021-01-29 00:05:03.000000000","message":"Loving this simplicity! auditing just needs to enable include_own","commit_id":"7509cbbd7a477a78051090b8891237a2f7437e91"}],"swift/container/sharder.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"19d27cb41bf52f42388724cfb6556a307cae0e44","unresolved":true,"context_lines":[{"line_number":814,"context_line":"                other_shard_ranges \u003d [sr for sr in shard_ranges"},{"line_number":815,"context_line":"                                      if sr is not own_shard_range_from_root]"},{"line_number":816,"context_line":"                self.logger.debug(\u0027Updating %s other shard range(s) from root\u0027,"},{"line_number":817,"context_line":"                                  len(other_shard_ranges))"},{"line_number":818,"context_line":"                broker.merge_shard_ranges(other_shard_ranges)"},{"line_number":819,"context_line":""},{"line_number":820,"context_line":"        delete_age \u003d time.time() - self.reclaim_age"}],"source_content_type":"text/x-python","patch_set":5,"id":"c24549a0_fddb7d51","line":817,"updated":"2021-01-28 22:21:48.000000000","message":"so if we\u0027re shrinking or shrunk, we merge in whatever other shard ranges came back from the root\n\nwhich will *always* include *at least* the root shard range itself (possibly in SHARDED state) but if *thats* the case we\u0027ll ALSO expect some ACTIVE acceptors\n\nWe do NOT expect acceptors to be in any state other than ACTIVE, and we don\u0027t expect ACTIVE acceptors AND an active root - but we\u0027re not enforcing any of that HERE before we merge in\n\nif we\u0027re shrinking or shrunk - what the root gives we accept","commit_id":"7509cbbd7a477a78051090b8891237a2f7437e91"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f7bb6804f1ba62d8f81f14d634624fb5e9966add","unresolved":true,"context_lines":[{"line_number":814,"context_line":"                other_shard_ranges \u003d [sr for sr in shard_ranges"},{"line_number":815,"context_line":"                                      if sr is not own_shard_range_from_root]"},{"line_number":816,"context_line":"                self.logger.debug(\u0027Updating %s other shard range(s) from root\u0027,"},{"line_number":817,"context_line":"                                  len(other_shard_ranges))"},{"line_number":818,"context_line":"                broker.merge_shard_ranges(other_shard_ranges)"},{"line_number":819,"context_line":""},{"line_number":820,"context_line":"        delete_age \u003d time.time() - self.reclaim_age"}],"source_content_type":"text/x-python","patch_set":5,"id":"4c2d132f_74657d1f","line":817,"in_reply_to":"4a313af8_7060b3ef","updated":"2021-01-29 13:17:03.000000000","message":"having written a unit test...turns out that with active root and acceptor the shard might cleave to both! which would also eventually resolve but is unnecessary work. I\u0027m inclined to add a check for overlaps in shard audit and just stall rather than try to deal with all cleaving scenarios.","commit_id":"7509cbbd7a477a78051090b8891237a2f7437e91"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"d639d97eb17a53910074f8e0c46a9e9923f9defe","unresolved":true,"context_lines":[{"line_number":814,"context_line":"                other_shard_ranges \u003d [sr for sr in shard_ranges"},{"line_number":815,"context_line":"                                      if sr is not own_shard_range_from_root]"},{"line_number":816,"context_line":"                self.logger.debug(\u0027Updating %s other shard range(s) from root\u0027,"},{"line_number":817,"context_line":"                                  len(other_shard_ranges))"},{"line_number":818,"context_line":"                broker.merge_shard_ranges(other_shard_ranges)"},{"line_number":819,"context_line":""},{"line_number":820,"context_line":"        delete_age \u003d time.time() - self.reclaim_age"}],"source_content_type":"text/x-python","patch_set":5,"id":"4a313af8_7060b3ef","line":817,"in_reply_to":"c24549a0_fddb7d51","updated":"2021-01-29 09:30:17.000000000","message":"correct\n\nif we did end up with ACTIVE acceptor and ACTIVE root (split-brain shrink), then (and I guess a probe test would be nice to verify this...) the shard would cleave to one of them (the acceptor would sort first unless the acceptor\u0027s upper\u003dMAX, in which case root would sort first), and cleaving would complete - so the shard would shrink. The root would eventually resolve the acceptor clash, and that might mean there\u0027s now misplaced objects from the shrunk shard in either root or the (mistaken) acceptor, so they should get moved by misplaced object correction.\n\nOr, we could check for overlaps (which would be the case with an active root and active acceptor) and refuse to cleave; then wait for the root to resolve itself.\n\nAt one point I considered making root shard ranges *always* sort last...not sure if that is essential though.","commit_id":"7509cbbd7a477a78051090b8891237a2f7437e91"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"19d27cb41bf52f42388724cfb6556a307cae0e44","unresolved":true,"context_lines":[{"line_number":1446,"context_line":"                # have moved the cleave context cursor to this shard\u0027s upper"},{"line_number":1447,"context_line":"                # bound so that cleaving will now be considered complete. Note:"},{"line_number":1448,"context_line":"                # we don\u0027t ignore the root if it is *ACTIVE* because then it is"},{"line_number":1449,"context_line":"                # the acceptor to which the shard should cleave"},{"line_number":1450,"context_line":"                self.logger.debug(\u0027Not cleaving to sharded root range\u0027)"},{"line_number":1451,"context_line":"                cleaving_context.range_done(None)  # don\u0027t move the cursor"},{"line_number":1452,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"66f38ddc_dc30e9d1","line":1449,"updated":"2021-01-28 22:21:48.000000000","message":"specifically we\u0027d never get to this elif because it *is* ACTIVE and was handled above in the _cleave_shard_range block","commit_id":"7509cbbd7a477a78051090b8891237a2f7437e91"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"d639d97eb17a53910074f8e0c46a9e9923f9defe","unresolved":true,"context_lines":[{"line_number":1446,"context_line":"                # have moved the cleave context cursor to this shard\u0027s upper"},{"line_number":1447,"context_line":"                # bound so that cleaving will now be considered complete. Note:"},{"line_number":1448,"context_line":"                # we don\u0027t ignore the root if it is *ACTIVE* because then it is"},{"line_number":1449,"context_line":"                # the acceptor to which the shard should cleave"},{"line_number":1450,"context_line":"                self.logger.debug(\u0027Not cleaving to sharded root range\u0027)"},{"line_number":1451,"context_line":"                cleaving_context.range_done(None)  # don\u0027t move the cursor"},{"line_number":1452,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"04e251b1_696ce8dc","line":1449,"in_reply_to":"66f38ddc_dc30e9d1","updated":"2021-01-29 09:30:17.000000000","message":"correct\n\nis the comment confusing? - I meant it to justify the elif condition","commit_id":"7509cbbd7a477a78051090b8891237a2f7437e91"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"19d27cb41bf52f42388724cfb6556a307cae0e44","unresolved":true,"context_lines":[{"line_number":1451,"context_line":"                cleaving_context.range_done(None)  # don\u0027t move the cursor"},{"line_number":1452,"context_line":"            else:"},{"line_number":1453,"context_line":"                self.logger.info(\u0027Stopped cleave at unready %s\u0027, shard_range)"},{"line_number":1454,"context_line":"                break"},{"line_number":1455,"context_line":""},{"line_number":1456,"context_line":"        if not ranges_done:"},{"line_number":1457,"context_line":"            # _cleave_shard_range always store()s the context on success; make"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a1da7c0_ac8863d2","line":1454,"updated":"2021-01-28 22:21:48.000000000","message":"I\u0027m sure this loop is what was giving Tim nightmares, and we\u0027ve had to make a few minor tweeks while working on shrinking overlaps","commit_id":"7509cbbd7a477a78051090b8891237a2f7437e91"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"d639d97eb17a53910074f8e0c46a9e9923f9defe","unresolved":true,"context_lines":[{"line_number":1451,"context_line":"                cleaving_context.range_done(None)  # don\u0027t move the cursor"},{"line_number":1452,"context_line":"            else:"},{"line_number":1453,"context_line":"                self.logger.info(\u0027Stopped cleave at unready %s\u0027, shard_range)"},{"line_number":1454,"context_line":"                break"},{"line_number":1455,"context_line":""},{"line_number":1456,"context_line":"        if not ranges_done:"},{"line_number":1457,"context_line":"            # _cleave_shard_range always store()s the context on success; make"}],"source_content_type":"text/x-python","patch_set":5,"id":"e4ddeb94_ed49c992","line":1454,"in_reply_to":"1a1da7c0_ac8863d2","updated":"2021-01-29 09:30:17.000000000","message":"I think I have seen the loop stop making progress if a FOUND shard overlaps...something like the found never becomes created so we just keep landing in the else case here????","commit_id":"7509cbbd7a477a78051090b8891237a2f7437e91"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"c0fba84d72e7dce0dbcfd054949ff159ec763179","unresolved":true,"context_lines":[{"line_number":1403,"context_line":"        # expected in a shard but can occur if there is an overlapping shard"},{"line_number":1404,"context_line":"        # range that has been discovered from the root."},{"line_number":1405,"context_line":"        ranges_todo \u003d [sr for sr in shard_ranges"},{"line_number":1406,"context_line":"                       if sr.state !\u003d ShardRange.SHRINKING]"},{"line_number":1407,"context_line":"        if cleaving_context.cursor:"},{"line_number":1408,"context_line":"            # always update ranges_todo in case more ranges have been found"},{"line_number":1409,"context_line":"            # since last visit"}],"source_content_type":"text/x-python","patch_set":6,"id":"50bb269e_a13d9c5e","line":1406,"updated":"2021-02-01 02:33:14.000000000","message":"So the shrinking shards are filtered out here, rather then skipped below.\n\nOne additional benefit of the pull baed model is if somewhow the acceptor shardrange gets big enough to shard (though not sure how that\u0027s possible expect for a in a split-brain network situation) then a new accetor will be given to the the SHRINKING shard the next time the SHRINKING shard is audited because of the overlap.","commit_id":"f6e3683e201cbd836d96ce427822bb5655efd0fc"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"79b7d22d1b2dfb03e276c5f7731674e494493a8a","unresolved":false,"context_lines":[{"line_number":1403,"context_line":"        # expected in a shard but can occur if there is an overlapping shard"},{"line_number":1404,"context_line":"        # range that has been discovered from the root."},{"line_number":1405,"context_line":"        ranges_todo \u003d [sr for sr in shard_ranges"},{"line_number":1406,"context_line":"                       if sr.state !\u003d ShardRange.SHRINKING]"},{"line_number":1407,"context_line":"        if cleaving_context.cursor:"},{"line_number":1408,"context_line":"            # always update ranges_todo in case more ranges have been found"},{"line_number":1409,"context_line":"            # since last visit"}],"source_content_type":"text/x-python","patch_set":6,"id":"261dd976_c7743dbc","line":1406,"in_reply_to":"2698373a_10a8e75e","updated":"2021-02-04 03:20:34.000000000","message":"Yeah, it\u0027s much cleaner, I like it!","commit_id":"f6e3683e201cbd836d96ce427822bb5655efd0fc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a33add95c39a96ee5d0be569cc2f1f5ee656c201","unresolved":true,"context_lines":[{"line_number":1403,"context_line":"        # expected in a shard but can occur if there is an overlapping shard"},{"line_number":1404,"context_line":"        # range that has been discovered from the root."},{"line_number":1405,"context_line":"        ranges_todo \u003d [sr for sr in shard_ranges"},{"line_number":1406,"context_line":"                       if sr.state !\u003d ShardRange.SHRINKING]"},{"line_number":1407,"context_line":"        if cleaving_context.cursor:"},{"line_number":1408,"context_line":"            # always update ranges_todo in case more ranges have been found"},{"line_number":1409,"context_line":"            # since last visit"}],"source_content_type":"text/x-python","patch_set":6,"id":"2698373a_10a8e75e","line":1406,"in_reply_to":"50bb269e_a13d9c5e","updated":"2021-02-01 09:48:26.000000000","message":"\u003e So the shrinking shards are filtered out here, rather then skipped below.\n\nThis should make no difference to the behaviour, just an attempt to make code a bit clearer","commit_id":"f6e3683e201cbd836d96ce427822bb5655efd0fc"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"c0fba84d72e7dce0dbcfd054949ff159ec763179","unresolved":true,"context_lines":[{"line_number":1434,"context_line":"                                         ShardRange.CLEAVED,"},{"line_number":1435,"context_line":"                                         ShardRange.ACTIVE):"},{"line_number":1436,"context_line":"                self.logger.info(\u0027Stopped cleave at unready %s\u0027, shard_range)"},{"line_number":1437,"context_line":"                break"},{"line_number":1438,"context_line":""},{"line_number":1439,"context_line":"            cleave_result \u003d self._cleave_shard_range("},{"line_number":1440,"context_line":"                broker, cleaving_context, shard_range)"}],"source_content_type":"text/x-python","patch_set":6,"id":"507e219a_449da43d","line":1437,"updated":"2021-02-01 02:33:14.000000000","message":"So we are now breaking if we find a root in the SHARDED state? This is different then before, or am I missing where SHARDED was filtered out?","commit_id":"f6e3683e201cbd836d96ce427822bb5655efd0fc"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"79b7d22d1b2dfb03e276c5f7731674e494493a8a","unresolved":false,"context_lines":[{"line_number":1434,"context_line":"                                         ShardRange.CLEAVED,"},{"line_number":1435,"context_line":"                                         ShardRange.ACTIVE):"},{"line_number":1436,"context_line":"                self.logger.info(\u0027Stopped cleave at unready %s\u0027, shard_range)"},{"line_number":1437,"context_line":"                break"},{"line_number":1438,"context_line":""},{"line_number":1439,"context_line":"            cleave_result \u003d self._cleave_shard_range("},{"line_number":1440,"context_line":"                broker, cleaving_context, shard_range)"}],"source_content_type":"text/x-python","patch_set":6,"id":"80cd0bd5_d5a1dbae","line":1437,"in_reply_to":"2a48cf44_20050f36","updated":"2021-02-04 03:20:34.000000000","message":"OK got it, because when we sort the ranges in broker.get_shard_ranges() we use the ShardRange.sort_key which garantees that an sharded root would come last, because it\u0027s sorted first by Upper, then State (and ACTIVE \u003c SHARDED), then Lower (and it\u0027ll be the lowest), and the name but we shouldn\u0027t need to get this far. In fact the first two in most instances would be enough. Nice!","commit_id":"f6e3683e201cbd836d96ce427822bb5655efd0fc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a33add95c39a96ee5d0be569cc2f1f5ee656c201","unresolved":true,"context_lines":[{"line_number":1434,"context_line":"                                         ShardRange.CLEAVED,"},{"line_number":1435,"context_line":"                                         ShardRange.ACTIVE):"},{"line_number":1436,"context_line":"                self.logger.info(\u0027Stopped cleave at unready %s\u0027, shard_range)"},{"line_number":1437,"context_line":"                break"},{"line_number":1438,"context_line":""},{"line_number":1439,"context_line":"            cleave_result \u003d self._cleave_shard_range("},{"line_number":1440,"context_line":"                broker, cleaving_context, shard_range)"}],"source_content_type":"text/x-python","patch_set":6,"id":"2a48cf44_20050f36","line":1437,"in_reply_to":"507e219a_449da43d","updated":"2021-02-01 09:48:26.000000000","message":"Depends on which \u0027before\u0027 :) :\n\n- on master, root ranges don\u0027t make it into the shards\n\n- in last patchset the cleave loop might have iterated to a sharded root, which it would then ignore (an I added a log about it being ignored). But the fact that the loop even found the sharded root was a quirk: on master the loop does not break when cleaving_done becomes true i.e. for a batch size of 2, the first shard of the two might have upper \u003e\u003d the shrinking shard\u0027s upper, so cleaving is done, but the loop would still iterate to the second in the batch, which could now be an irrelevant sharded root range.\n\nIn this patchset the loop breaks as soon as cleaving_done becomes true so we should never get to the irrelevant sharded root (because there should be an active acceptor to which cleaving completes that would sort ahead of the root), but if we do reach  sharded root (unexpected case) then the \u0027Stopped cleave at unready...\u0027 will be logged.","commit_id":"f6e3683e201cbd836d96ce427822bb5655efd0fc"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e5afa3468d6b16e36b90bda99d2cd089126758e1","unresolved":true,"context_lines":[{"line_number":1413,"context_line":"                # shard range) are not normally expected in a shard but can"},{"line_number":1414,"context_line":"                # occur if there is an overlapping shard range that has been"},{"line_number":1415,"context_line":"                # discovered from the root."},{"line_number":1416,"context_line":"                cleaving_context.range_done(None)  # don\u0027t move the cursor"},{"line_number":1417,"context_line":"                continue"},{"line_number":1418,"context_line":"            elif shard_range.state in (ShardRange.CREATED,"},{"line_number":1419,"context_line":"                                       ShardRange.CLEAVED,"}],"source_content_type":"text/x-python","patch_set":7,"id":"2db68369_b477b319","side":"PARENT","line":1416,"updated":"2021-02-04 19:32:31.000000000","message":"This was the only place we call range_done() with None; can we just drop the `if` up at L320?","commit_id":"beb1c3969bfb3c408cc2b6b5b2300e06090f7a5d"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"6b7f6a5c5aff50e036aba59c0ae23adbd1f261f1","unresolved":false,"context_lines":[{"line_number":1413,"context_line":"                # shard range) are not normally expected in a shard but can"},{"line_number":1414,"context_line":"                # occur if there is an overlapping shard range that has been"},{"line_number":1415,"context_line":"                # discovered from the root."},{"line_number":1416,"context_line":"                cleaving_context.range_done(None)  # don\u0027t move the cursor"},{"line_number":1417,"context_line":"                continue"},{"line_number":1418,"context_line":"            elif shard_range.state in (ShardRange.CREATED,"},{"line_number":1419,"context_line":"                                       ShardRange.CLEAVED,"}],"source_content_type":"text/x-python","patch_set":7,"id":"f0c4ab2e_7e848a54","side":"PARENT","line":1416,"in_reply_to":"2db68369_b477b319","updated":"2021-02-05 11:43:11.000000000","message":"Done","commit_id":"beb1c3969bfb3c408cc2b6b5b2300e06090f7a5d"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e5afa3468d6b16e36b90bda99d2cd089126758e1","unresolved":true,"context_lines":[{"line_number":1405,"context_line":"        ranges_todo \u003d [sr for sr in shard_ranges"},{"line_number":1406,"context_line":"                       if sr.state !\u003d ShardRange.SHRINKING]"},{"line_number":1407,"context_line":"        if cleaving_context.cursor:"},{"line_number":1408,"context_line":"            # always update ranges_todo in case more ranges have been found"},{"line_number":1409,"context_line":"            # since last visit"},{"line_number":1410,"context_line":"            cleaving_context.ranges_todo \u003d len(ranges_todo)"},{"line_number":1411,"context_line":"            self.logger.debug(\u0027Continuing to cleave (%s done, %s todo): %s\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"089107e9_b02785c5","line":1408,"range":{"start_line":1408,"start_character":48,"end_line":1408,"end_character":75},"updated":"2021-02-04 19:32:31.000000000","message":"... or fewer, if we wrote down the context back when we were still counting SHRINKING ranges as \"todo\".","commit_id":"79a9e7459f4d9bdf621e8f075134f395aed8706c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"6b7f6a5c5aff50e036aba59c0ae23adbd1f261f1","unresolved":false,"context_lines":[{"line_number":1405,"context_line":"        ranges_todo \u003d [sr for sr in shard_ranges"},{"line_number":1406,"context_line":"                       if sr.state !\u003d ShardRange.SHRINKING]"},{"line_number":1407,"context_line":"        if cleaving_context.cursor:"},{"line_number":1408,"context_line":"            # always update ranges_todo in case more ranges have been found"},{"line_number":1409,"context_line":"            # since last visit"},{"line_number":1410,"context_line":"            cleaving_context.ranges_todo \u003d len(ranges_todo)"},{"line_number":1411,"context_line":"            self.logger.debug(\u0027Continuing to cleave (%s done, %s todo): %s\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"16387d0f_9ccc076e","line":1408,"range":{"start_line":1408,"start_character":48,"end_line":1408,"end_character":75},"in_reply_to":"089107e9_b02785c5","updated":"2021-02-05 11:43:11.000000000","message":"Done.\n\nNote to self: cleaving_context.ranges_todo has no bearing on the cleave operation other than in logging, and it is not clear that it needs to be persisted, other than for inspection of the cleaving_context by humans perhaps.","commit_id":"79a9e7459f4d9bdf621e8f075134f395aed8706c"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e5afa3468d6b16e36b90bda99d2cd089126758e1","unresolved":true,"context_lines":[{"line_number":1424,"context_line":"                # note: there may still be ranges_todo, for example: if this"},{"line_number":1425,"context_line":"                # shard is shrinking and has merged a root shard range in"},{"line_number":1426,"context_line":"                # sharded state along with an active acceptor shard range, but"},{"line_number":1427,"context_line":"                # the root range is irrelevant"},{"line_number":1428,"context_line":"                break"},{"line_number":1429,"context_line":""},{"line_number":1430,"context_line":"            if len(ranges_done) \u003d\u003d self.cleave_batch_size:"}],"source_content_type":"text/x-python","patch_set":7,"id":"a61d68c4_4f762070","line":1427,"updated":"2021-02-04 19:32:31.000000000","message":"OK, and we\u0027re relying on the (upper, state, lower) ordering to keep that root range at the end of the list and not trip the \u0027Stopped cleave at unready\u0027 message.","commit_id":"79a9e7459f4d9bdf621e8f075134f395aed8706c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"6b7f6a5c5aff50e036aba59c0ae23adbd1f261f1","unresolved":false,"context_lines":[{"line_number":1424,"context_line":"                # note: there may still be ranges_todo, for example: if this"},{"line_number":1425,"context_line":"                # shard is shrinking and has merged a root shard range in"},{"line_number":1426,"context_line":"                # sharded state along with an active acceptor shard range, but"},{"line_number":1427,"context_line":"                # the root range is irrelevant"},{"line_number":1428,"context_line":"                break"},{"line_number":1429,"context_line":""},{"line_number":1430,"context_line":"            if len(ranges_done) \u003d\u003d self.cleave_batch_size:"}],"source_content_type":"text/x-python","patch_set":7,"id":"57f9c056_f4f13dab","line":1427,"in_reply_to":"a61d68c4_4f762070","updated":"2021-02-05 11:43:11.000000000","message":"yes. In a previous version (before fixing the loop) I had needed a special case to trap the irrelevant sharded root range to avoid triggering the \u0027Stopped cleave at unready\u0027 log.","commit_id":"79a9e7459f4d9bdf621e8f075134f395aed8706c"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e5afa3468d6b16e36b90bda99d2cd089126758e1","unresolved":true,"context_lines":[{"line_number":1432,"context_line":""},{"line_number":1433,"context_line":"            if shard_range.state not in (ShardRange.CREATED,"},{"line_number":1434,"context_line":"                                         ShardRange.CLEAVED,"},{"line_number":1435,"context_line":"                                         ShardRange.ACTIVE):"},{"line_number":1436,"context_line":"                self.logger.info(\u0027Stopped cleave at unready %s\u0027, shard_range)"},{"line_number":1437,"context_line":"                break"},{"line_number":1438,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"8dfa1104_ff810c95","line":1435,"updated":"2021-02-04 19:32:31.000000000","message":"Off-topic: I\u0027m still nervous that we don\u0027t have anything in the audits to ensure that the ranges in these states will cover our section of the namespace :-/","commit_id":"79a9e7459f4d9bdf621e8f075134f395aed8706c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"6b7f6a5c5aff50e036aba59c0ae23adbd1f261f1","unresolved":false,"context_lines":[{"line_number":1432,"context_line":""},{"line_number":1433,"context_line":"            if shard_range.state not in (ShardRange.CREATED,"},{"line_number":1434,"context_line":"                                         ShardRange.CLEAVED,"},{"line_number":1435,"context_line":"                                         ShardRange.ACTIVE):"},{"line_number":1436,"context_line":"                self.logger.info(\u0027Stopped cleave at unready %s\u0027, shard_range)"},{"line_number":1437,"context_line":"                break"},{"line_number":1438,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8e21ce_1f823fdf","line":1435,"in_reply_to":"7ab2510a_23a92401","updated":"2021-02-05 11:43:11.000000000","message":"Ack","commit_id":"79a9e7459f4d9bdf621e8f075134f395aed8706c"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"8d53ef09c97b186a2be7e810f16d9a50df4d6078","unresolved":true,"context_lines":[{"line_number":1432,"context_line":""},{"line_number":1433,"context_line":"            if shard_range.state not in (ShardRange.CREATED,"},{"line_number":1434,"context_line":"                                         ShardRange.CLEAVED,"},{"line_number":1435,"context_line":"                                         ShardRange.ACTIVE):"},{"line_number":1436,"context_line":"                self.logger.info(\u0027Stopped cleave at unready %s\u0027, shard_range)"},{"line_number":1437,"context_line":"                break"},{"line_number":1438,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"7ab2510a_23a92401","line":1435,"in_reply_to":"8dfa1104_ff810c95","updated":"2021-02-05 00:49:30.000000000","message":"Sounds like a good feature request so we don\u0027t follow up on this at some point.","commit_id":"79a9e7459f4d9bdf621e8f075134f395aed8706c"}],"test/probe/test_sharder.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"19d27cb41bf52f42388724cfb6556a307cae0e44","unresolved":true,"context_lines":[{"line_number":2561,"context_line":"            sr.epoch \u003d sr.state_timestamp \u003d Timestamp.now()"},{"line_number":2562,"context_line":"        own_sr \u003d broker.get_own_shard_range()"},{"line_number":2563,"context_line":"        own_sr.update_state(ShardRange.ACTIVE, state_timestamp\u003dTimestamp.now())"},{"line_number":2564,"context_line":"        broker.merge_shard_ranges(shard_ranges + [own_sr])"},{"line_number":2565,"context_line":""},{"line_number":2566,"context_line":"        # replicate and run sharders"},{"line_number":2567,"context_line":"        self.replicators.once()"}],"source_content_type":"text/x-python","patch_set":5,"id":"91134581_56cbb610","line":2564,"updated":"2021-01-28 22:21:48.000000000","message":"yeah there\u0027s you go!","commit_id":"7509cbbd7a477a78051090b8891237a2f7437e91"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e5afa3468d6b16e36b90bda99d2cd089126758e1","unresolved":true,"context_lines":[{"line_number":2549,"context_line":"        self.assert_container_state(self.brain.nodes[2], \u0027sharded\u0027, 2)"},{"line_number":2550,"context_line":"        self.assert_container_listing(obj_names)"},{"line_number":2551,"context_line":""},{"line_number":2552,"context_line":"        # Let\u0027s pretend that some actor in the system has determined that the"},{"line_number":2553,"context_line":"        # all the shard ranges should shrink back to root"},{"line_number":2554,"context_line":"        # TODO: replace this db manipulation if/when manage_shard_ranges can"},{"line_number":2555,"context_line":"        # manage shrinking..."}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1b605f_fcade0a1","line":2552,"range":{"start_line":2552,"start_character":74,"end_line":2552,"end_character":77},"updated":"2021-02-04 19:32:31.000000000","message":"nit: delete","commit_id":"79a9e7459f4d9bdf621e8f075134f395aed8706c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"6b7f6a5c5aff50e036aba59c0ae23adbd1f261f1","unresolved":false,"context_lines":[{"line_number":2549,"context_line":"        self.assert_container_state(self.brain.nodes[2], \u0027sharded\u0027, 2)"},{"line_number":2550,"context_line":"        self.assert_container_listing(obj_names)"},{"line_number":2551,"context_line":""},{"line_number":2552,"context_line":"        # Let\u0027s pretend that some actor in the system has determined that the"},{"line_number":2553,"context_line":"        # all the shard ranges should shrink back to root"},{"line_number":2554,"context_line":"        # TODO: replace this db manipulation if/when manage_shard_ranges can"},{"line_number":2555,"context_line":"        # manage shrinking..."}],"source_content_type":"text/x-python","patch_set":7,"id":"e96ebb0f_8e38fbf2","line":2552,"range":{"start_line":2552,"start_character":74,"end_line":2552,"end_character":77},"in_reply_to":"3a1b605f_fcade0a1","updated":"2021-02-05 11:43:11.000000000","message":"Done","commit_id":"79a9e7459f4d9bdf621e8f075134f395aed8706c"}],"test/unit/container/test_server.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"9072c239345ee9a4aee217f3b850b06a3187836a","unresolved":true,"context_lines":[{"line_number":3212,"context_line":"        shard_ranges \u003d ["},{"line_number":3213,"context_line":"            ShardRange(\u0027.sharded_a/_%s\u0027 % upper, next(self.ts),"},{"line_number":3214,"context_line":"                       lower, upper, state\u003dstate, deleted\u003ddeleted)"},{"line_number":3215,"context_line":"            for i, (lower, upper, state, deleted) in enumerate(shard_bounds)]"},{"line_number":3216,"context_line":""},{"line_number":3217,"context_line":"        # create container and PUT some shard ranges"},{"line_number":3218,"context_line":"        headers \u003d {\u0027X-Timestamp\u0027: next(self.ts).normal}"}],"source_content_type":"text/x-python","patch_set":1,"id":"394dac1a_e80a6e30","line":3215,"updated":"2021-01-22 06:04:44.000000000","message":"why are we enumerating here? I don\u0027t see the \u0027i\u0027 variable being used?","commit_id":"2711a92643cbd37af871a60e827d6228b267e9c4"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ad5644e793b87fd8e24487b5f83c317b665296a6","unresolved":false,"context_lines":[{"line_number":3212,"context_line":"        shard_ranges \u003d ["},{"line_number":3213,"context_line":"            ShardRange(\u0027.sharded_a/_%s\u0027 % upper, next(self.ts),"},{"line_number":3214,"context_line":"                       lower, upper, state\u003dstate, deleted\u003ddeleted)"},{"line_number":3215,"context_line":"            for i, (lower, upper, state, deleted) in enumerate(shard_bounds)]"},{"line_number":3216,"context_line":""},{"line_number":3217,"context_line":"        # create container and PUT some shard ranges"},{"line_number":3218,"context_line":"        headers \u003d {\u0027X-Timestamp\u0027: next(self.ts).normal}"}],"source_content_type":"text/x-python","patch_set":1,"id":"5968aa5a_82f4e896","line":3215,"in_reply_to":"394dac1a_e80a6e30","updated":"2021-01-22 09:39:53.000000000","message":"because I copied it from somewhere where the i was used 😭\n\nwill fix","commit_id":"2711a92643cbd37af871a60e827d6228b267e9c4"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"79b7d22d1b2dfb03e276c5f7731674e494493a8a","unresolved":true,"context_lines":[{"line_number":3259,"context_line":"                    for sr in shard_ranges[1:2] + [own_sr]]"},{"line_number":3260,"context_line":"        resp \u003d do_test(ts_now, {\u0027marker\u0027: \u0027f\u0027, \u0027end_marker\u0027: \u0027t\u0027,"},{"line_number":3261,"context_line":"                                \u0027states\u0027: \u0027auditing\u0027})"},{"line_number":3262,"context_line":"        self.assertEqual(expected, json.loads(resp.body))"},{"line_number":3263,"context_line":""},{"line_number":3264,"context_line":"    def test_GET_auto_record_type(self):"},{"line_number":3265,"context_line":"        # make a container"}],"source_content_type":"text/x-python","patch_set":6,"id":"94d57a22_b6f10702","line":3262,"updated":"2021-02-04 03:20:34.000000000","message":"Because you\u0027ve changed the states of the shard ranges, should we still confirm that the own_shard_range wont be returned if its ACTIVE and not auditing?\n\nThough maybe that\u0027s overkill.","commit_id":"f6e3683e201cbd836d96ce427822bb5655efd0fc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"fb2b6d23faf41571c1ce714f65e76cc36f5b3bb1","unresolved":false,"context_lines":[{"line_number":3259,"context_line":"                    for sr in shard_ranges[1:2] + [own_sr]]"},{"line_number":3260,"context_line":"        resp \u003d do_test(ts_now, {\u0027marker\u0027: \u0027f\u0027, \u0027end_marker\u0027: \u0027t\u0027,"},{"line_number":3261,"context_line":"                                \u0027states\u0027: \u0027auditing\u0027})"},{"line_number":3262,"context_line":"        self.assertEqual(expected, json.loads(resp.body))"},{"line_number":3263,"context_line":""},{"line_number":3264,"context_line":"    def test_GET_auto_record_type(self):"},{"line_number":3265,"context_line":"        # make a container"}],"source_content_type":"text/x-python","patch_set":6,"id":"fd3f870b_2aac074e","line":3262,"in_reply_to":"94d57a22_b6f10702","updated":"2021-02-04 12:26:44.000000000","message":"Done","commit_id":"f6e3683e201cbd836d96ce427822bb5655efd0fc"}],"test/unit/container/test_sharder.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"9072c239345ee9a4aee217f3b850b06a3187836a","unresolved":true,"context_lines":[{"line_number":130,"context_line":"        after \u003d Timestamp.now()"},{"line_number":131,"context_line":"        while after \u003c\u003d before:"},{"line_number":132,"context_line":"            after \u003d Timestamp.now()"},{"line_number":133,"context_line":"        return after"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"class TestSharder(BaseTestSharder):"}],"source_content_type":"text/x-python","patch_set":1,"id":"8932813e_3187f107","line":133,"updated":"2021-01-22 06:04:44.000000000","message":"Lets just hope noone ever uses this with a mocked Timestamp.now() because they could lead to an infinite loop.","commit_id":"2711a92643cbd37af871a60e827d6228b267e9c4"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ad5644e793b87fd8e24487b5f83c317b665296a6","unresolved":true,"context_lines":[{"line_number":130,"context_line":"        after \u003d Timestamp.now()"},{"line_number":131,"context_line":"        while after \u003c\u003d before:"},{"line_number":132,"context_line":"            after \u003d Timestamp.now()"},{"line_number":133,"context_line":"        return after"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"class TestSharder(BaseTestSharder):"}],"source_content_type":"text/x-python","patch_set":1,"id":"cc187017_9c01bdd1","line":133,"in_reply_to":"8932813e_3187f107","updated":"2021-01-22 09:39:53.000000000","message":"hmmm, I didn\u0027t like this, I added it because I found tests would fail because two calls to Timestamp.now() returned same value OMM\n\nmaybe there\u0027s a better solution, like using a ts iter","commit_id":"2711a92643cbd37af871a60e827d6228b267e9c4"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"79b7d22d1b2dfb03e276c5f7731674e494493a8a","unresolved":true,"context_lines":[{"line_number":4996,"context_line":"        # overlaps not merged unless own shard is SHRINKING or SHRUNK"},{"line_number":4997,"context_line":"        for own_state in ShardRange.STATES:"},{"line_number":4998,"context_line":"            if own_state in (ShardRange.SHRINKING, ShardRange.SHRUNK):"},{"line_number":4999,"context_line":"                continue"},{"line_number":5000,"context_line":"            for acceptor_state in ShardRange.STATES:"},{"line_number":5001,"context_line":"                for root_state in ShardRange.STATES:"},{"line_number":5002,"context_line":"                    assert_ok(own_state, acceptor_state, root_state)"}],"source_content_type":"text/x-python","patch_set":6,"id":"d89ce088_30755d9f","line":4999,"updated":"2021-02-04 03:20:34.000000000","message":"So we never test when own_stat is SHRINKING or SHRUNK yet check_audit does an assert if own_state is in those.\n\nSo I assume we can loose this if statement. Seems to pass without it, and assume that\u0027s expected.","commit_id":"f6e3683e201cbd836d96ce427822bb5655efd0fc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"fb2b6d23faf41571c1ce714f65e76cc36f5b3bb1","unresolved":false,"context_lines":[{"line_number":4996,"context_line":"        # overlaps not merged unless own shard is SHRINKING or SHRUNK"},{"line_number":4997,"context_line":"        for own_state in ShardRange.STATES:"},{"line_number":4998,"context_line":"            if own_state in (ShardRange.SHRINKING, ShardRange.SHRUNK):"},{"line_number":4999,"context_line":"                continue"},{"line_number":5000,"context_line":"            for acceptor_state in ShardRange.STATES:"},{"line_number":5001,"context_line":"                for root_state in ShardRange.STATES:"},{"line_number":5002,"context_line":"                    assert_ok(own_state, acceptor_state, root_state)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ae8f1ab5_0d8112ea","line":4999,"in_reply_to":"d89ce088_30755d9f","updated":"2021-02-04 12:26:44.000000000","message":"good catch, yes the if clause here is not necessary","commit_id":"f6e3683e201cbd836d96ce427822bb5655efd0fc"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e5afa3468d6b16e36b90bda99d2cd089126758e1","unresolved":true,"context_lines":[{"line_number":2389,"context_line":"        self.assertEqual(1, context.ranges_todo)"},{"line_number":2390,"context_line":"        info \u003d ["},{"line_number":2391,"context_line":"            line for line in self.logger.get_lines_for_level(\u0027info\u0027)"},{"line_number":2392,"context_line":"            if line.startswith(\u0027Replicating new shard container a/c\u0027)"},{"line_number":2393,"context_line":"        ]"},{"line_number":2394,"context_line":"        self.assertEqual(1, len(info))"},{"line_number":2395,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"29c589d1_7389a28d","line":2392,"range":{"start_line":2392,"start_character":32,"end_line":2392,"end_character":67},"updated":"2021-02-04 19:32:31.000000000","message":"Yes... \"new\" \"shard\" container.. nothing to see here. Carry on.","commit_id":"79a9e7459f4d9bdf621e8f075134f395aed8706c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"6b7f6a5c5aff50e036aba59c0ae23adbd1f261f1","unresolved":false,"context_lines":[{"line_number":2389,"context_line":"        self.assertEqual(1, context.ranges_todo)"},{"line_number":2390,"context_line":"        info \u003d ["},{"line_number":2391,"context_line":"            line for line in self.logger.get_lines_for_level(\u0027info\u0027)"},{"line_number":2392,"context_line":"            if line.startswith(\u0027Replicating new shard container a/c\u0027)"},{"line_number":2393,"context_line":"        ]"},{"line_number":2394,"context_line":"        self.assertEqual(1, len(info))"},{"line_number":2395,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"11d2b351_00793837","line":2392,"range":{"start_line":2392,"start_character":32,"end_line":2392,"end_character":67},"in_reply_to":"29c589d1_7389a28d","updated":"2021-02-05 11:43:11.000000000","message":"I never feel great making assertions about log messages (other than verifying errors etc).\n\nFrom the perspective of the shrinking shard, it just wrote a db that it considers to be a \u0027shard\u0027 of itself ... I guess???","commit_id":"79a9e7459f4d9bdf621e8f075134f395aed8706c"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e5afa3468d6b16e36b90bda99d2cd089126758e1","unresolved":true,"context_lines":[{"line_number":4967,"context_line":"            overlaps \u003d self._make_shard_ranges([(\u0027a\u0027, \u0027c\u0027), (\u0027\u0027, \u0027\u0027)],"},{"line_number":4968,"context_line":"                                               [acceptor_state, root_state])"},{"line_number":4969,"context_line":"            sharder, mock_swift \u003d self.call_audit_container("},{"line_number":4970,"context_line":"                broker, [own_sr] + overlaps)"},{"line_number":4971,"context_line":"            expected_headers \u003d {\u0027X-Backend-Record-Type\u0027: \u0027shard\u0027,"},{"line_number":4972,"context_line":"                                \u0027X-Newest\u0027: \u0027true\u0027,"},{"line_number":4973,"context_line":"                                \u0027X-Backend-Include-Deleted\u0027: \u0027True\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ba28d49_9dcf7a85","line":4970,"range":{"start_line":4970,"start_character":24,"end_line":4970,"end_character":43},"updated":"2021-02-04 19:32:31.000000000","message":"The order things are returned would vary with the states, but that shouldn\u0027t actually matter for the audit, right?","commit_id":"79a9e7459f4d9bdf621e8f075134f395aed8706c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"6b7f6a5c5aff50e036aba59c0ae23adbd1f261f1","unresolved":false,"context_lines":[{"line_number":4967,"context_line":"            overlaps \u003d self._make_shard_ranges([(\u0027a\u0027, \u0027c\u0027), (\u0027\u0027, \u0027\u0027)],"},{"line_number":4968,"context_line":"                                               [acceptor_state, root_state])"},{"line_number":4969,"context_line":"            sharder, mock_swift \u003d self.call_audit_container("},{"line_number":4970,"context_line":"                broker, [own_sr] + overlaps)"},{"line_number":4971,"context_line":"            expected_headers \u003d {\u0027X-Backend-Record-Type\u0027: \u0027shard\u0027,"},{"line_number":4972,"context_line":"                                \u0027X-Newest\u0027: \u0027true\u0027,"},{"line_number":4973,"context_line":"                                \u0027X-Backend-Include-Deleted\u0027: \u0027True\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"e48e7ded_29da6bba","line":4970,"range":{"start_line":4970,"start_character":24,"end_line":4970,"end_character":43},"in_reply_to":"9ba28d49_9dcf7a85","updated":"2021-02-05 11:43:11.000000000","message":"shouldn\u0027t matter, but worth fixing\n\nI\u0027ll add\n\n  shard_ranges.sort(key\u003dShardRange.sort_key)\n\nin call_audit_container in case there are other egregious cases","commit_id":"79a9e7459f4d9bdf621e8f075134f395aed8706c"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e5afa3468d6b16e36b90bda99d2cd089126758e1","unresolved":true,"context_lines":[{"line_number":4980,"context_line":"            if own_state in (ShardRange.SHRINKING, ShardRange.SHRUNK):"},{"line_number":4981,"context_line":"                # check acceptor \u0026 root are merged into audited shard"},{"line_number":4982,"context_line":"                shard_ranges \u003d broker.get_shard_ranges()"},{"line_number":4983,"context_line":"                self.assertEqual(2, len(shard_ranges))"},{"line_number":4984,"context_line":"                self.assertEqual("},{"line_number":4985,"context_line":"                    [dict(sr) for sr in overlaps],"},{"line_number":4986,"context_line":"                    [dict(sr) for sr in broker.get_shard_ranges()])"}],"source_content_type":"text/x-python","patch_set":7,"id":"5d63abe2_162c2de1","line":4983,"updated":"2021-02-04 19:32:31.000000000","message":"Isn\u0027t this covered in the next assertion? If we keep this, I think I\u0027d rather move it below the list comparison, if only for the improved failure message.","commit_id":"79a9e7459f4d9bdf621e8f075134f395aed8706c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"6b7f6a5c5aff50e036aba59c0ae23adbd1f261f1","unresolved":false,"context_lines":[{"line_number":4980,"context_line":"            if own_state in (ShardRange.SHRINKING, ShardRange.SHRUNK):"},{"line_number":4981,"context_line":"                # check acceptor \u0026 root are merged into audited shard"},{"line_number":4982,"context_line":"                shard_ranges \u003d broker.get_shard_ranges()"},{"line_number":4983,"context_line":"                self.assertEqual(2, len(shard_ranges))"},{"line_number":4984,"context_line":"                self.assertEqual("},{"line_number":4985,"context_line":"                    [dict(sr) for sr in overlaps],"},{"line_number":4986,"context_line":"                    [dict(sr) for sr in broker.get_shard_ranges()])"}],"source_content_type":"text/x-python","patch_set":7,"id":"d534fc0a_3632a018","line":4983,"in_reply_to":"5d63abe2_162c2de1","updated":"2021-02-05 11:43:11.000000000","message":"agree it is superfluous and obscures a better failure message","commit_id":"79a9e7459f4d9bdf621e8f075134f395aed8706c"}]}
