)]}'
{"swift/account/backend.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b8e64b35cc788d6b8f196a9b93bfb24ecdf1ece0","unresolved":false,"context_lines":[{"line_number":299,"context_line":"                row[\u0027delete_timestamp\u0027] \u003e row[\u0027put_timestamp\u0027])"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def is_reclaimable(self, now, reclaim_age):"},{"line_number":302,"context_line":"        self._commit_puts_stale_ok()"},{"line_number":303,"context_line":"        with self.get() as conn:"},{"line_number":304,"context_line":"            info \u003d conn.execute(\u0027\u0027\u0027"},{"line_number":305,"context_line":"                SELECT put_timestamp, delete_timestamp, container_count"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f6a8fd7_0f509d0a","line":302,"range":{"start_line":302,"start_character":26,"end_line":302,"end_character":34},"updated":"2018-04-23 22:39:26.000000000","message":"This is probably pre-existing behavior, but -- are we really OK with this DB maybe being stale when we\u0027re threatening to reclaim it?","commit_id":"0f770610a607bc5f67bec6741cc247b5f727d39e"}],"swift/common/db_replicator.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b8e64b35cc788d6b8f196a9b93bfb24ecdf1ece0","unresolved":false,"context_lines":[{"line_number":514,"context_line":""},{"line_number":515,"context_line":"        :return success: bool, False indicates an error occurred"},{"line_number":516,"context_line":"        \"\"\""},{"line_number":517,"context_line":"        debug_template \u003d \u0027Not deleting db %s (%%s)\u0027 % broker.db_file"},{"line_number":518,"context_line":"        max_row_delta \u003d broker.get_max_row() - orig_info[\u0027max_row\u0027]"},{"line_number":519,"context_line":"        if max_row_delta:"},{"line_number":520,"context_line":"            reason \u003d \u0027%s new rows\u0027 % max_row_delta"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f6a8fd7_6fb2794b","line":517,"updated":"2018-04-23 22:39:26.000000000","message":"nit: I\u0027d kinda prefer to just interpolate once, or even twice... three times just seems wasteful -- we could *at least* push broker.db_file down into the debug args.","commit_id":"0f770610a607bc5f67bec6741cc247b5f727d39e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b8e64b35cc788d6b8f196a9b93bfb24ecdf1ece0","unresolved":false,"context_lines":[{"line_number":523,"context_line":"        if not (responses and all(responses)):"},{"line_number":524,"context_line":"            reason \u003d \u0027%s/%s success\u0027 % (responses.count(True), len(responses))"},{"line_number":525,"context_line":"            self.logger.debug(debug_template, reason)"},{"line_number":526,"context_line":"            return True"},{"line_number":527,"context_line":"        # If the db should not be on this node and has been successfully synced"},{"line_number":528,"context_line":"        # to all of its peers, it can be removed."},{"line_number":529,"context_line":"        if not self.delete_db(broker):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f6a8fd7_afc3b188","line":526,"range":{"start_line":526,"start_character":12,"end_line":526,"end_character":23},"updated":"2018-04-23 22:39:26.000000000","message":"OK, so a failure to replicate isn\u0027t an error -- those only happen when we can\u0027t unlink the file (I guess)...","commit_id":"0f770610a607bc5f67bec6741cc247b5f727d39e"}],"swift/container/backend.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"23dd31039d20df046f3d03052c2b72714c395b3c","unresolved":false,"context_lines":[{"line_number":809,"context_line":"            info \u003d conn.execute(\u0027\u0027\u0027"},{"line_number":810,"context_line":"                SELECT put_timestamp, delete_timestamp"},{"line_number":811,"context_line":"                FROM container_stat\u0027\u0027\u0027).fetchone()"},{"line_number":812,"context_line":"        return self.empty() and ("},{"line_number":813,"context_line":"            Timestamp(now - reclaim_age) \u003e"},{"line_number":814,"context_line":"            Timestamp(info[\u0027delete_timestamp\u0027]) \u003e"},{"line_number":815,"context_line":"            Timestamp(info[\u0027put_timestamp\u0027]))"},{"line_number":816,"context_line":""},{"line_number":817,"context_line":"    def get_info_is_deleted(self):"},{"line_number":818,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_c92ad82a","line":815,"range":{"start_line":812,"start_character":32,"end_line":815,"end_character":45},"updated":"2018-04-20 12:07:48.000000000","message":"this would avoid db hits as:\n\n  if (Timestamp(now - reclaim_age) \u003e\n          Timestamp(info[\u0027delete_timestamp\u0027]) \u003e\n          Timestamp(info[\u0027put_timestamp\u0027])):\n      return self.empty()\n  return False","commit_id":"9f76c468fccdc4b06e6c5bcea310358d0912804d"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b8e64b35cc788d6b8f196a9b93bfb24ecdf1ece0","unresolved":false,"context_lines":[{"line_number":649,"context_line":"        item_list.append(item)"},{"line_number":650,"context_line":""},{"line_number":651,"context_line":"    def _empty(self):"},{"line_number":652,"context_line":"        self._commit_puts_stale_ok()"},{"line_number":653,"context_line":"        with self.get() as conn:"},{"line_number":654,"context_line":"            try:"},{"line_number":655,"context_line":"                row \u003d conn.execute("}],"source_content_type":"text/x-python","patch_set":5,"id":"9f6a8fd7_8f24ad5f","line":652,"updated":"2018-04-23 22:39:26.000000000","message":"So we\u0027ll do this at least twice during is_reclaimable? Is there much of any downside to that?","commit_id":"0f770610a607bc5f67bec6741cc247b5f727d39e"}],"swift/container/replicator.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"23dd31039d20df046f3d03052c2b72714c395b3c","unresolved":false,"context_lines":[{"line_number":277,"context_line":"            return True"},{"line_number":278,"context_line":"        max_row_delta \u003d broker.get_max_row(\u0027shard_ranges\u0027) - \\"},{"line_number":279,"context_line":"            orig_info[\u0027shard_max_row\u0027]"},{"line_number":280,"context_line":"        if max_row_delta:"},{"line_number":281,"context_line":"            reason \u003d \u0027%s new shard_ranges\u0027 % max_row_delta"},{"line_number":282,"context_line":"            self.logger.debug(debug_template, reason)"},{"line_number":283,"context_line":"            return True"},{"line_number":284,"context_line":"        return super(ContainerReplicator, self).cleanup_post_replicate("},{"line_number":285,"context_line":"            broker, orig_info, responses)"},{"line_number":286,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_4999e876","line":283,"range":{"start_line":280,"start_character":9,"end_line":283,"end_character":23},"updated":"2018-04-20 12:07:48.000000000","message":"yes!","commit_id":"9f76c468fccdc4b06e6c5bcea310358d0912804d"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e0b64441f0b95483bcc91f67a51bbbcaf0ba66c9","unresolved":false,"context_lines":[{"line_number":277,"context_line":"            return True"},{"line_number":278,"context_line":"        max_row_delta \u003d broker.get_max_row(\u0027shard_ranges\u0027) - \\"},{"line_number":279,"context_line":"            orig_info[\u0027shard_max_row\u0027]"},{"line_number":280,"context_line":"        if max_row_delta:"},{"line_number":281,"context_line":"            reason \u003d \u0027%s new shard_ranges\u0027 % max_row_delta"},{"line_number":282,"context_line":"            self.logger.debug(debug_template, reason)"},{"line_number":283,"context_line":"            return True"},{"line_number":284,"context_line":"        return super(ContainerReplicator, self).cleanup_post_replicate("},{"line_number":285,"context_line":"            broker, orig_info, responses)"},{"line_number":286,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_1a69ec1f","line":283,"range":{"start_line":280,"start_character":9,"end_line":283,"end_character":23},"in_reply_to":"9f6a8fd7_4999e876","updated":"2018-04-20 13:44:13.000000000","message":"...but no :(\n\nThis is problematic - because we fetch shard ranges from the remote, it is likely that the remote will send a shard ranges with updated stats and so we\u0027ll see new shard range rows.\n\nThe sharder only creates \u0027handoff\u0027 shard dbs for the purpose of replicating rows, and when it does it merges shard ranges before rows. If we remove this check there is a small window when shards have been merged but not yet rows, but the number of shard ranges merged is small (\u003c\u003d2 - own and maybe an acceptor).\n\nThe sharder also call _replicate_object when it has found or created new shard ranges, but that is on a primary.\n\nSo I *think* it is ok to lose this check??","commit_id":"9f76c468fccdc4b06e6c5bcea310358d0912804d"}],"test/unit/container/test_replicator.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"23dd31039d20df046f3d03052c2b72714c395b3c","unresolved":false,"context_lines":[{"line_number":1195,"context_line":"        res \u003d daemon.cleanup_post_replicate(broker, orig_info, [True] * 3)"},{"line_number":1196,"context_line":"        self.assertTrue(res)"},{"line_number":1197,"context_line":"        self.assertTrue(os.path.exists(broker.db_file))"},{"line_number":1198,"context_line":"        self.assertEqual([\u0027Not deleting db %s (state unsharded)\u0027 %"},{"line_number":1199,"context_line":"                          broker.db_file],"},{"line_number":1200,"context_line":"                         daemon.logger.get_lines_for_level(\u0027debug\u0027))"},{"line_number":1201,"context_line":"        daemon.logger.clear()"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_e91b1c7e","line":1198,"range":{"start_line":1198,"start_character":27,"end_line":1198,"end_character":63},"updated":"2018-04-20 12:07:48.000000000","message":"this message could be confusing - why not delete if unsharded - we could add \u0027sharding required\u0027","commit_id":"9f76c468fccdc4b06e6c5bcea310358d0912804d"}]}
