)]}'
{"swift/obj/expirer.py":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b7078a4bc2c73fc75568cf9eb7f6e219ea169d6e","unresolved":false,"context_lines":[{"line_number":212,"context_line":""},{"line_number":213,"context_line":"                timestamp, actual_obj \u003d obj.split(\u0027-\u0027, 1)"},{"line_number":214,"context_line":"                timestamp \u003d int(timestamp)"},{"line_number":215,"context_line":"                if timestamp \u003e int(time()):"},{"line_number":216,"context_line":"                    break"},{"line_number":217,"context_line":"                pool.spawn_n("},{"line_number":218,"context_line":"                    self.delete_object, actual_obj, timestamp,"},{"line_number":219,"context_line":"                    container, obj)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_4290644f","side":"PARENT","line":216,"range":{"start_line":215,"start_character":0,"end_line":216,"end_character":25},"updated":"2018-02-15 07:41:32.000000000","message":"anyway, I found this if statement needn\u0027t in the parent patch because that is asserted in the iter_cont_objs_to_expire iteration.","commit_id":"d8754818c35299997a6c9f2b5b1610313786285b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d4667742b750dc58c60a341c0b5f00f6e0d26e44","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        :param task_iter: An iterator of (task_container, target_path,"},{"line_number":104,"context_line":"            timestamp_to_delete). task_obj is None if the pair is for the"},{"line_number":105,"context_line":"            container itself."},{"line_number":106,"context_line":"        \"\"\""},{"line_number":107,"context_line":"        obj_cache \u003d defaultdict(list)"},{"line_number":108,"context_line":"        cnt \u003d 0"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_4f587d55","line":105,"updated":"2018-02-15 17:39:11.000000000","message":"This could use a little more work; maybe something like\n\n\u003e An iterator of delete-task dicts, which should each have a ``target_path`` key.\n\nThe reference to task_obj being None is outdated now, right?","commit_id":"710b206d33bf7262bd088bab911b5ac8ae2c062e"},{"author":{"_account_id":14766,"name":"Kazuhiro MIYAHARA","email":"miyahara.kazuhiro@lab.ntt.co.jp","username":"miyahara"},"change_message_id":"97fa554ac02293f2b9fe783e8d6e69aa02a208e5","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        :param task_iter: An iterator of (task_container, target_path,"},{"line_number":104,"context_line":"            timestamp_to_delete). task_obj is None if the pair is for the"},{"line_number":105,"context_line":"            container itself."},{"line_number":106,"context_line":"        \"\"\""},{"line_number":107,"context_line":"        obj_cache \u003d defaultdict(list)"},{"line_number":108,"context_line":"        cnt \u003d 0"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_6da19046","line":105,"in_reply_to":"3fa0c359_4f587d55","updated":"2018-02-19 08:37:38.000000000","message":"Done in patch 538171.","commit_id":"710b206d33bf7262bd088bab911b5ac8ae2c062e"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"8673202273287b51dd1eaaf43612adcfc6237636","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"            if cnt \u003e MAX_OBJECTS_TO_CACHE:"},{"line_number":130,"context_line":"                for task_pair in dump_obj_cache_in_round_robin():"},{"line_number":131,"context_line":"                    yield task_pair"},{"line_number":132,"context_line":"                cnt \u003d 0"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        for task_pair in dump_obj_cache_in_round_robin():"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_1b404507","line":131,"range":{"start_line":131,"start_character":26,"end_line":131,"end_character":35},"updated":"2018-02-19 01:09:32.000000000","message":"It isn\u0027t really a task_pair anymore. This should be \u0027delete_task\u0027 or even just \u0027task\u0027 or something.","commit_id":"710b206d33bf7262bd088bab911b5ac8ae2c062e"},{"author":{"_account_id":14766,"name":"Kazuhiro MIYAHARA","email":"miyahara.kazuhiro@lab.ntt.co.jp","username":"miyahara"},"change_message_id":"97fa554ac02293f2b9fe783e8d6e69aa02a208e5","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"            if cnt \u003e MAX_OBJECTS_TO_CACHE:"},{"line_number":130,"context_line":"                for task_pair in dump_obj_cache_in_round_robin():"},{"line_number":131,"context_line":"                    yield task_pair"},{"line_number":132,"context_line":"                cnt \u003d 0"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        for task_pair in dump_obj_cache_in_round_robin():"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_2d8388ab","line":131,"range":{"start_line":131,"start_character":26,"end_line":131,"end_character":35},"in_reply_to":"3fa0c359_1b404507","updated":"2018-02-19 08:37:38.000000000","message":"Done in patch 538171.","commit_id":"710b206d33bf7262bd088bab911b5ac8ae2c062e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d4667742b750dc58c60a341c0b5f00f6e0d26e44","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        for c in self.swift.iter_containers(self.expiring_objects_account):"},{"line_number":143,"context_line":"            task_container \u003d str(c[\u0027name\u0027])"},{"line_number":144,"context_line":"            timestamp \u003d Timestamp(task_container)"},{"line_number":145,"context_line":"            if timestamp \u003e Timestamp.now():"},{"line_number":146,"context_line":"                break"},{"line_number":147,"context_line":"            yield task_container"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_4fef1de9","line":145,"updated":"2018-02-15 17:39:11.000000000","message":"Off topic: we might want to grab a singular concept of \"now\" at the start of run_once, rather than have our window grow slightly larger as we process deletes...","commit_id":"710b206d33bf7262bd088bab911b5ac8ae2c062e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d4667742b750dc58c60a341c0b5f00f6e0d26e44","unresolved":false,"context_lines":[{"line_number":158,"context_line":"                task_obj \u003d o[\u0027name\u0027].encode(\u0027utf8\u0027)"},{"line_number":159,"context_line":"                delete_timestamp, target_path \u003d task_obj.split(\u0027-\u0027, 1)"},{"line_number":160,"context_line":"                delete_timestamp \u003d Timestamp(delete_timestamp)"},{"line_number":161,"context_line":"                if delete_timestamp \u003e Timestamp.now():"},{"line_number":162,"context_line":"                    # we shouldn\u0027t yield the object that doesn\u0027t reach"},{"line_number":163,"context_line":"                    # the expiration date yet."},{"line_number":164,"context_line":"                    break"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_8ff8c57c","line":161,"updated":"2018-02-15 17:39:11.000000000","message":"So the timestamp is included in *both* the container name and the object name? Huh... seems unnecessary...\n\nOff-topic: I kinda wish https://docs.openstack.org/swift/latest/overview_expiring_objects.html had some examples of what you\u0027d find in the .expiring_objects account...","commit_id":"710b206d33bf7262bd088bab911b5ac8ae2c062e"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"8673202273287b51dd1eaaf43612adcfc6237636","unresolved":false,"context_lines":[{"line_number":158,"context_line":"                task_obj \u003d o[\u0027name\u0027].encode(\u0027utf8\u0027)"},{"line_number":159,"context_line":"                delete_timestamp, target_path \u003d task_obj.split(\u0027-\u0027, 1)"},{"line_number":160,"context_line":"                delete_timestamp \u003d Timestamp(delete_timestamp)"},{"line_number":161,"context_line":"                if delete_timestamp \u003e Timestamp.now():"},{"line_number":162,"context_line":"                    # we shouldn\u0027t yield the object that doesn\u0027t reach"},{"line_number":163,"context_line":"                    # the expiration date yet."},{"line_number":164,"context_line":"                    break"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_7b62a9af","line":161,"in_reply_to":"3fa0c359_8ff8c57c","updated":"2018-02-19 01:09:32.000000000","message":"Tim, to make matters confusing, the container timestamp is a different timestamp. It\u0027s a normalised and rounded to by using a divisor to shard and group based on expiry dates. https://github.com/openstack/swift/blob/master/swift/common/utils.py#L3879-L3886\n\nThough a single now from run_once etc would still work.","commit_id":"710b206d33bf7262bd088bab911b5ac8ae2c062e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d4667742b750dc58c60a341c0b5f00f6e0d26e44","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                    self.delete_object, delete_task[\u0027target_path\u0027],"},{"line_number":213,"context_line":"                    delete_task[\u0027delete_timestamp\u0027],"},{"line_number":214,"context_line":"                    delete_task[\u0027task_container\u0027],"},{"line_number":215,"context_line":"                    delete_task[\u0027task_object\u0027])"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"            pool.waitall()"},{"line_number":218,"context_line":"            for container in task_containers:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_0f7835f6","line":215,"updated":"2018-02-15 17:39:11.000000000","message":"Oh man, now I really want to change the arg names in delete_object! Then we could just say\n\n pool.spawn_n(self.delete_object, **delete_task)\n\nright?","commit_id":"710b206d33bf7262bd088bab911b5ac8ae2c062e"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"8673202273287b51dd1eaaf43612adcfc6237636","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                    self.delete_object, delete_task[\u0027target_path\u0027],"},{"line_number":213,"context_line":"                    delete_task[\u0027delete_timestamp\u0027],"},{"line_number":214,"context_line":"                    delete_task[\u0027task_container\u0027],"},{"line_number":215,"context_line":"                    delete_task[\u0027task_object\u0027])"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"            pool.waitall()"},{"line_number":218,"context_line":"            for container in task_containers:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_9b1a1515","line":215,"in_reply_to":"3fa0c359_0f7835f6","updated":"2018-02-19 01:09:32.000000000","message":"that would be nice :)\n\nAlso, this seems to be the only call to self.delete_object (outside of testing that is) so if we\u0027re moving to a task (or job) model here, we could just change the delete_object to simply take a task.\n\nbut Tim\u0027s idea is more reusable so I like it better. Seeing as it\u0027s always a delete_task we could remove the \"task\" from the key names. I\u0027d argue the name of timestamp in the delete_object method could be renamed to delete_timestamp as that keeps it abundantly clear what this timestamp is.","commit_id":"710b206d33bf7262bd088bab911b5ac8ae2c062e"},{"author":{"_account_id":14766,"name":"Kazuhiro MIYAHARA","email":"miyahara.kazuhiro@lab.ntt.co.jp","username":"miyahara"},"change_message_id":"97fa554ac02293f2b9fe783e8d6e69aa02a208e5","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                    self.delete_object, delete_task[\u0027target_path\u0027],"},{"line_number":213,"context_line":"                    delete_task[\u0027delete_timestamp\u0027],"},{"line_number":214,"context_line":"                    delete_task[\u0027task_container\u0027],"},{"line_number":215,"context_line":"                    delete_task[\u0027task_object\u0027])"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"            pool.waitall()"},{"line_number":218,"context_line":"            for container in task_containers:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_d0be37fe","line":215,"in_reply_to":"3fa0c359_9b1a1515","updated":"2018-02-19 08:37:38.000000000","message":"Done in patch 538171.\nBut I leave \"task\" in key names. Because, there are \"target_path\" key. \"task_container\" and \"task_obj\" means that the values are NOT \"target_container\" and \"target_obj\" clearly.","commit_id":"710b206d33bf7262bd088bab911b5ac8ae2c062e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d4667742b750dc58c60a341c0b5f00f6e0d26e44","unresolved":false,"context_lines":[{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        :param actual_obj: The name of the end-user object to delete:"},{"line_number":328,"context_line":"                           \u0027\u003caccount\u003e/\u003ccontainer\u003e/\u003cobject\u003e\u0027"},{"line_number":329,"context_line":"        # TODO: perhaps timestamp should be a swift.common.utils.Timestamp"},{"line_number":330,"context_line":"        :param timestamp: The timestamp the X-Delete-At value must match to"},{"line_number":331,"context_line":"                          perform the actual delete."},{"line_number":332,"context_line":"        :raises UnexpectedResponse: if the delete was unsuccessful and"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_9a3fa1b4","line":329,"updated":"2018-02-15 17:39:11.000000000","message":"With the transform we did on line 160, it *is* a Timestamp now, isn\u0027t it? At any rate, +1, I think I like it better as a Timestamp.","commit_id":"710b206d33bf7262bd088bab911b5ac8ae2c062e"},{"author":{"_account_id":14766,"name":"Kazuhiro MIYAHARA","email":"miyahara.kazuhiro@lab.ntt.co.jp","username":"miyahara"},"change_message_id":"97fa554ac02293f2b9fe783e8d6e69aa02a208e5","unresolved":false,"context_lines":[{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        :param actual_obj: The name of the end-user object to delete:"},{"line_number":328,"context_line":"                           \u0027\u003caccount\u003e/\u003ccontainer\u003e/\u003cobject\u003e\u0027"},{"line_number":329,"context_line":"        # TODO: perhaps timestamp should be a swift.common.utils.Timestamp"},{"line_number":330,"context_line":"        :param timestamp: The timestamp the X-Delete-At value must match to"},{"line_number":331,"context_line":"                          perform the actual delete."},{"line_number":332,"context_line":"        :raises UnexpectedResponse: if the delete was unsuccessful and"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_b0d5ab1d","line":329,"in_reply_to":"3fa0c359_9a3fa1b4","updated":"2018-02-19 08:37:38.000000000","message":"I agree. So I updated unit tests which use string as timestamp argment to delete_actual_object.","commit_id":"710b206d33bf7262bd088bab911b5ac8ae2c062e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d4667742b750dc58c60a341c0b5f00f6e0d26e44","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        path \u003d \u0027/v1/\u0027 + urllib.parse.quote(actual_obj.lstrip(\u0027/\u0027))"},{"line_number":336,"context_line":"        self.swift.make_request("},{"line_number":337,"context_line":"            \u0027DELETE\u0027, path,"},{"line_number":338,"context_line":"            # TODO: prehaps better using timestamp.internal???"},{"line_number":339,"context_line":"            {\u0027X-If-Delete-At\u0027: Timestamp(timestamp).normal,"},{"line_number":340,"context_line":"             \u0027X-Timestamp\u0027: Timestamp(timestamp).normal,"},{"line_number":341,"context_line":"             \u0027X-Backend-Clean-Expiring-Object-Queue\u0027: \u0027no\u0027},"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_cf124d63","line":338,"updated":"2018-02-15 17:39:11.000000000","message":"*shrug* I\u0027m not sure that it matters... X-Delete-At must be an int, so we should never even get into fractional seconds, much less offsets.","commit_id":"710b206d33bf7262bd088bab911b5ac8ae2c062e"}]}
