)]}'
{"swift/container/backend.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8a056986c8c49dca25f3b9661cc1a7d028d68965","unresolved":false,"context_lines":[{"line_number":1134,"context_line":"                          \u0027meta_timestamp\u0027, \u0027deleted\u0027}"},{"line_number":1135,"context_line":"        \"\"\""},{"line_number":1136,"context_line":"        if not item_list:"},{"line_number":1137,"context_line":"            return"},{"line_number":1138,"context_line":""},{"line_number":1139,"context_line":"        for item in item_list:"},{"line_number":1140,"context_line":"            for col in (\u0027name\u0027, \u0027lower\u0027, \u0027upper\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_0f281b32","line":1137,"updated":"2017-10-19 20:29:31.000000000","message":"Good call!","commit_id":"d4e823fdf21ad7905a4a977f82de12d0c4c6ea85"}],"swift/container/sharder.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8a056986c8c49dca25f3b9661cc1a7d028d68965","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        if resp.status_int \u003d\u003d 404:"},{"line_number":190,"context_line":"            # if root was deleted after this broker was last put then pretend"},{"line_number":191,"context_line":"            # this is an orphan by returning empty list, otherwise treat it as"},{"line_number":192,"context_line":"            # a failed attempt - the root may be out there still."},{"line_number":193,"context_line":"            root_delete_ts \u003d resp.headers.get(\u0027X-Backend-DELETE-Timestamp\u0027)"},{"line_number":194,"context_line":"            if root_delete_ts:"},{"line_number":195,"context_line":"                shard_ts \u003d broker.get_info()[\u0027put_timestamp\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_8ff08bcb","line":192,"updated":"2017-10-19 20:29:31.000000000","message":"Should there be any considerations for our own object count? Like, if we have objects, maybe *don\u0027t* assume the container should be deleted?\n\nMaybe something more stringent? But if we still have objects and despite having synced with all of the other replicas of this shard *since* the root was deleted, that root should probably still exist.","commit_id":"d4e823fdf21ad7905a4a977f82de12d0c4c6ea85"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1df55e2d81dc6d1ac69830010b664c85e3f973a4","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        if resp.status_int \u003d\u003d 404:"},{"line_number":190,"context_line":"            # if root was deleted after this broker was last put then pretend"},{"line_number":191,"context_line":"            # this is an orphan by returning empty list, otherwise treat it as"},{"line_number":192,"context_line":"            # a failed attempt - the root may be out there still."},{"line_number":193,"context_line":"            root_delete_ts \u003d resp.headers.get(\u0027X-Backend-DELETE-Timestamp\u0027)"},{"line_number":194,"context_line":"            if root_delete_ts:"},{"line_number":195,"context_line":"                shard_ts \u003d broker.get_info()[\u0027put_timestamp\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_bbfffbff","line":192,"in_reply_to":"3f4b6375_8ff08bcb","updated":"2017-10-20 15:40:22.000000000","message":"+1 for last sentence - I have some ideas as to how we might achieve that - but I *think* no amount of up front LBYL checks can prevent a root delete when there may populated shards.","commit_id":"d4e823fdf21ad7905a4a977f82de12d0c4c6ea85"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8a056986c8c49dca25f3b9661cc1a7d028d68965","unresolved":false,"context_lines":[{"line_number":384,"context_line":"            return"},{"line_number":385,"context_line":"        return super(ContainerReplicator, self).delete_db(broker)"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"    def _audit_root(self, broker):"},{"line_number":388,"context_line":"        # TODO We will need to audit the root (make sure there are no missing"},{"line_number":389,"context_line":"        #      gaps in the ranges."},{"line_number":390,"context_line":"        # This is the root container, and therefore the tome of knowledge,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_6fa8af1e","line":387,"updated":"2017-10-19 20:29:31.000000000","message":"OK, so we still aren\u0027t calling this one yet, yeah?","commit_id":"d4e823fdf21ad7905a4a977f82de12d0c4c6ea85"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"c1686b3e6f80b7f938974e276b2dbca38a793f19","unresolved":false,"context_lines":[{"line_number":384,"context_line":"            return"},{"line_number":385,"context_line":"        return super(ContainerReplicator, self).delete_db(broker)"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"    def _audit_root(self, broker):"},{"line_number":388,"context_line":"        # TODO We will need to audit the root (make sure there are no missing"},{"line_number":389,"context_line":"        #      gaps in the ranges."},{"line_number":390,"context_line":"        # This is the root container, and therefore the tome of knowledge,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_6d5ac64f","line":387,"in_reply_to":"3f4b6375_60d432be","updated":"2017-10-23 05:25:55.000000000","message":"yeah, audit code needs work, used to call it. but as mentioned we need to think best how to deal in situations. \n\nIe there\u0027s the range analyser that looks for the lastest set of ranges plus complete and incomplete ranges, but we aren\u0027t actually using it in the audit yet. I was working on that, need to figure out where it was up to, or if the analyser is what we need. But in a good case, the first result in the analysers iterator will be the newest path and extras can be deleted. if incomplete, we can try and walk back (get the next iteration and see if it was and decide what to do). etc. Tests would probably be the answer here. If I can find some time I\u0027ll work on some.","commit_id":"d4e823fdf21ad7905a4a977f82de12d0c4c6ea85"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1df55e2d81dc6d1ac69830010b664c85e3f973a4","unresolved":false,"context_lines":[{"line_number":384,"context_line":"            return"},{"line_number":385,"context_line":"        return super(ContainerReplicator, self).delete_db(broker)"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"    def _audit_root(self, broker):"},{"line_number":388,"context_line":"        # TODO We will need to audit the root (make sure there are no missing"},{"line_number":389,"context_line":"        #      gaps in the ranges."},{"line_number":390,"context_line":"        # This is the root container, and therefore the tome of knowledge,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_60d432be","line":387,"in_reply_to":"3f4b6375_6fa8af1e","updated":"2017-10-20 15:40:22.000000000","message":"nope and I haven\u0027t looked at it yet, just broke it out for clarity.","commit_id":"d4e823fdf21ad7905a4a977f82de12d0c4c6ea85"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8a056986c8c49dca25f3b9661cc1a7d028d68965","unresolved":false,"context_lines":[{"line_number":408,"context_line":"        if missing_ranges:"},{"line_number":409,"context_line":"            self.logger.error(\u0027Missing range(s) dectected: %s\u0027,"},{"line_number":410,"context_line":"                              \u0027-\u0027.join(missing_ranges))"},{"line_number":411,"context_line":"            continue_with_container \u003d False"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"        if not continue_with_container:"},{"line_number":414,"context_line":"            self.logger.increment(\u0027audit_failed\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_8fe40bae","line":411,"updated":"2017-10-19 20:29:31.000000000","message":"Hmm... so we don\u0027t take any corrective action here?\n\nI guess... we just wait for whatever shard(s) *should* be covering the gap to report usage?\n\nMaybe we could go looking in the hidden .sharded account to see if there are containers we aren\u0027t aware of? And if we *don\u0027t* find anything, shrink the gap into one of the neighbors?","commit_id":"d4e823fdf21ad7905a4a977f82de12d0c4c6ea85"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"c1686b3e6f80b7f938974e276b2dbca38a793f19","unresolved":false,"context_lines":[{"line_number":408,"context_line":"        if missing_ranges:"},{"line_number":409,"context_line":"            self.logger.error(\u0027Missing range(s) dectected: %s\u0027,"},{"line_number":410,"context_line":"                              \u0027-\u0027.join(missing_ranges))"},{"line_number":411,"context_line":"            continue_with_container \u003d False"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"        if not continue_with_container:"},{"line_number":414,"context_line":"            self.logger.increment(\u0027audit_failed\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_0d3592f7","line":411,"in_reply_to":"3f4b6375_8fe40bae","updated":"2017-10-23 05:25:55.000000000","message":"yeah, this hasn\u0027t been updated to make use the analyser yet.. and even then we may need to wait or something, has a shard update been lost and a stats will fix it?","commit_id":"d4e823fdf21ad7905a4a977f82de12d0c4c6ea85"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8a056986c8c49dca25f3b9661cc1a7d028d68965","unresolved":false,"context_lines":[{"line_number":427,"context_line":"        # case any objects exist inside it."},{"line_number":428,"context_line":"        if broker.is_deleted():"},{"line_number":429,"context_line":"            # TODO: not reachable?"},{"line_number":430,"context_line":"            return False"},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"        # Get the root view of the world."},{"line_number":433,"context_line":"        ranges \u003d self._get_shard_ranges(broker, newest\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_af5c674b","line":430,"range":{"start_line":430,"start_character":19,"end_line":430,"end_character":24},"updated":"2017-10-19 20:29:31.000000000","message":"This seems to contradict\n\n\u003e we want it to pass, in case any objects exist inside it\n\n...","commit_id":"d4e823fdf21ad7905a4a977f82de12d0c4c6ea85"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1df55e2d81dc6d1ac69830010b664c85e3f973a4","unresolved":false,"context_lines":[{"line_number":427,"context_line":"        # case any objects exist inside it."},{"line_number":428,"context_line":"        if broker.is_deleted():"},{"line_number":429,"context_line":"            # TODO: not reachable?"},{"line_number":430,"context_line":"            return False"},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"        # Get the root view of the world."},{"line_number":433,"context_line":"        ranges \u003d self._get_shard_ranges(broker, newest\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_1b372fe6","line":430,"range":{"start_line":430,"start_character":19,"end_line":430,"end_character":24},"in_reply_to":"3f4b6375_af5c674b","updated":"2017-10-20 15:40:22.000000000","message":"right! if no metadata then the shard doesn\u0027t know about it\u0027s root :(","commit_id":"d4e823fdf21ad7905a4a977f82de12d0c4c6ea85"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8a056986c8c49dca25f3b9661cc1a7d028d68965","unresolved":false,"context_lines":[{"line_number":441,"context_line":""},{"line_number":442,"context_line":"        if not ranges:"},{"line_number":443,"context_line":"            self.logger.debug(\u0027Deleting orphaned shard %s\u0027, shard_range.name)"},{"line_number":444,"context_line":"            broker.delete_db(Timestamp.now().internal)"},{"line_number":445,"context_line":"            return False"},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"        if shard_range in ranges:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_6f2b0f94","line":444,"updated":"2017-10-19 20:29:31.000000000","message":"What if we have objects that were added between our last stats update and when the root container was deleted?","commit_id":"d4e823fdf21ad7905a4a977f82de12d0c4c6ea85"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1df55e2d81dc6d1ac69830010b664c85e3f973a4","unresolved":false,"context_lines":[{"line_number":441,"context_line":""},{"line_number":442,"context_line":"        if not ranges:"},{"line_number":443,"context_line":"            self.logger.debug(\u0027Deleting orphaned shard %s\u0027, shard_range.name)"},{"line_number":444,"context_line":"            broker.delete_db(Timestamp.now().internal)"},{"line_number":445,"context_line":"            return False"},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"        if shard_range in ranges:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_e07b82bb","line":444,"in_reply_to":"3f4b6375_6f2b0f94","updated":"2017-10-20 15:40:22.000000000","message":"hmmm, in that case the shard is going to hang around whether we delete it or not, so maybe we should not delete_db\n\nif the shard\u0027s object count then does fall to zero, we do this on next cycle, so long as the root has not been reclaimed\n\nif the root gets reclaimed before the shard can delete itself then IDK...we cannot tell the difference between reclaimed root and root that is temporarily unavailable.","commit_id":"d4e823fdf21ad7905a4a977f82de12d0c4c6ea85"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8a056986c8c49dca25f3b9661cc1a7d028d68965","unresolved":false,"context_lines":[{"line_number":639,"context_line":"                # root containers."},{"line_number":640,"context_line":"                self._process_broker(broker, node, part)"},{"line_number":641,"context_line":"            else:"},{"line_number":642,"context_line":"                self.logger.debug(\u0027Skipping non-sharding container %s\u0027 % path)"},{"line_number":643,"context_line":""},{"line_number":644,"context_line":"        # wipe out the cache do disable bypass in delete_db"},{"line_number":645,"context_line":"        cleanups \u003d self.shard_cleanups"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_a138fbd2","line":642,"updated":"2017-10-19 20:29:31.000000000","message":"We\u0027ll probably want to drop this before merging; seems likely to be rather noisy.\n\nBut I\u0027m fine with holding on to it for now.","commit_id":"d4e823fdf21ad7905a4a977f82de12d0c4c6ea85"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1df55e2d81dc6d1ac69830010b664c85e3f973a4","unresolved":false,"context_lines":[{"line_number":639,"context_line":"                # root containers."},{"line_number":640,"context_line":"                self._process_broker(broker, node, part)"},{"line_number":641,"context_line":"            else:"},{"line_number":642,"context_line":"                self.logger.debug(\u0027Skipping non-sharding container %s\u0027 % path)"},{"line_number":643,"context_line":""},{"line_number":644,"context_line":"        # wipe out the cache do disable bypass in delete_db"},{"line_number":645,"context_line":"        cleanups \u003d self.shard_cleanups"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_40601602","line":642,"in_reply_to":"3f4b6375_a138fbd2","updated":"2017-10-20 15:40:22.000000000","message":"+1 and note that same goes fo other debug I am adding - it\u0027s just helpful when debugging those probe tests to have some trailmarkers.","commit_id":"d4e823fdf21ad7905a4a977f82de12d0c4c6ea85"}],"test/probe/test_sharder.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8a056986c8c49dca25f3b9661cc1a7d028d68965","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                func(cnode, cpart, account, container)"},{"line_number":75,"context_line":"            except DirectClientException as err:"},{"line_number":76,"context_line":"                if not expect_failure:"},{"line_number":77,"context_line":"                    unexpected_responses.append((cnode, err))"},{"line_number":78,"context_line":"            else:"},{"line_number":79,"context_line":"                if expect_failure:"},{"line_number":80,"context_line":"                    unexpected_responses.append((cnode, \u0027success\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_a166bbec","line":77,"updated":"2017-10-19 20:29:31.000000000","message":"I wonder if expect_failure should maybe take the particular status code we\u0027re expecting...","commit_id":"d4e823fdf21ad7905a4a977f82de12d0c4c6ea85"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1df55e2d81dc6d1ac69830010b664c85e3f973a4","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                func(cnode, cpart, account, container)"},{"line_number":75,"context_line":"            except DirectClientException as err:"},{"line_number":76,"context_line":"                if not expect_failure:"},{"line_number":77,"context_line":"                    unexpected_responses.append((cnode, err))"},{"line_number":78,"context_line":"            else:"},{"line_number":79,"context_line":"                if expect_failure:"},{"line_number":80,"context_line":"                    unexpected_responses.append((cnode, \u0027success\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_20207ab0","line":77,"in_reply_to":"3f4b6375_a166bbec","updated":"2017-10-20 15:40:22.000000000","message":"+1 so in fact it coud become acceptable_statuses tuple like internal client has and defult to 2xx","commit_id":"d4e823fdf21ad7905a4a977f82de12d0c4c6ea85"}]}
