)]}'
{"swift/obj/expirer.py":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"6e4340c7303f46b251e1c36f3b9063aa8451ae37","unresolved":false,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        # yield (task_container, None) in the original order"},{"line_number":148,"context_line":"        for task_container, _junk in task_iter:"},{"line_number":149,"context_line":"            yield (task_container, None)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def iter_cont_objs_to_expire(self):"},{"line_number":152,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"5f93b717_aef643d6","line":149,"updated":"2018-02-01 02:06:46.000000000","message":"If we don\u0027t break the loop above, continue instead. maybe we don\u0027t have to make this as is here, do we?\n\nThe original question is from because we may reach out StopIteration from task_iter above.\n\nOh, it may be good hint because i hit the issue in the test. set list to task_iter may be painful (but perhaps set iterator may work fine?)","commit_id":"9a43c9df3013913a6cac23e126565ccb45ff693c"},{"author":{"_account_id":14766,"name":"Kazuhiro MIYAHARA","email":"miyahara.kazuhiro@lab.ntt.co.jp","username":"miyahara"},"change_message_id":"155737b2109acf4ba8d447fa4c076635d24fdf1a","unresolved":false,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        # yield (task_container, None) in the original order"},{"line_number":148,"context_line":"        for task_container, _junk in task_iter:"},{"line_number":149,"context_line":"            yield (task_container, None)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def iter_cont_objs_to_expire(self):"},{"line_number":152,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"5f93b717_7a5d5513","line":149,"in_reply_to":"5f93b717_aef643d6","updated":"2018-02-01 06:28:21.000000000","message":"Done.\nAt first, I thought that break and move to the second for-loop is more readable. But this implementation is confusing...\nNow I use \"continue\" instead of \"break\" as you say.","commit_id":"9a43c9df3013913a6cac23e126565ccb45ff693c"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"fe33710ced837e19981c32d241604d06644e8cc0","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            except ValueError:"},{"line_number":137,"context_line":"                cache_key \u003d None"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"            if cache_key not in obj_cache:"},{"line_number":140,"context_line":"                obj_cache[cache_key] \u003d []"},{"line_number":141,"context_line":"            obj_cache[cache_key].append((task_container, task_obj))"},{"line_number":142,"context_line":"            cnt +\u003d 1"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"            if cnt \u003e MAX_OBJECTS_TO_CACHE:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa0c359_785ffa0d","line":141,"range":{"start_line":139,"start_character":12,"end_line":141,"end_character":67},"updated":"2018-02-08 06:43:45.000000000","message":"We could use:\n\n obj_cache.setdefault(cache_key, []).append((task_container, task_obj))\n\nAs then we don\u0027t have to do an in check first. Though it probably does the same thing behind the scenes.","commit_id":"f9fe7114a0228e2940b37e5e1b0cf42c50f82ad0"},{"author":{"_account_id":14766,"name":"Kazuhiro MIYAHARA","email":"miyahara.kazuhiro@lab.ntt.co.jp","username":"miyahara"},"change_message_id":"5d0f76e3a76f5b7bb20e15057bd4e2b2df128b8e","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            except ValueError:"},{"line_number":137,"context_line":"                cache_key \u003d None"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"            if cache_key not in obj_cache:"},{"line_number":140,"context_line":"                obj_cache[cache_key] \u003d []"},{"line_number":141,"context_line":"            obj_cache[cache_key].append((task_container, task_obj))"},{"line_number":142,"context_line":"            cnt +\u003d 1"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"            if cnt \u003e MAX_OBJECTS_TO_CACHE:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa0c359_a1fa0aba","line":141,"range":{"start_line":139,"start_character":12,"end_line":141,"end_character":67},"in_reply_to":"3fa0c359_785ffa0d","updated":"2018-02-09 09:29:23.000000000","message":"OK. I like the default value idea.\nNow, I think defaultdict is more simple. So I updated this code with defaultdict.","commit_id":"f9fe7114a0228e2940b37e5e1b0cf42c50f82ad0"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"8951c90e69f3763b88c9e885a9ccd266cfde3844","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                # Before start yielding pairs for containers, yield all pairs"},{"line_number":124,"context_line":"                # for objects. obj_cache will be empty from the second time."},{"line_number":125,"context_line":"                for task_pair in dump_obj_cache_in_round_robin():"},{"line_number":126,"context_line":"                    yield task_pair"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"                # yield pairs for containers in the original order"},{"line_number":129,"context_line":"                yield (task_container, None)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3fa0c359_89cc7335","line":126,"updated":"2018-02-14 09:09:47.000000000","message":"Hmm... sorry I don\u0027t like this if statement because yield (task_container, None) should be always the tail of iteration.\n\nPerhaps, [1] is nice to be consistent the original code intention with this round robin style.\n\n1: https://gist.github.com/bloodeagle40234/9c32a05742171dc0f64787d2b9159c70","commit_id":"94590363a10b854788569a806422f3fda7dc80d1"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"fb0b197ae14653ec52d02b51780e1232c899b76f","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            while obj_cache:"},{"line_number":115,"context_line":"                for key in sorted(obj_cache):"},{"line_number":116,"context_line":"                    if obj_cache[key]:"},{"line_number":117,"context_line":"                        yield obj_cache[key].pop(0)"},{"line_number":118,"context_line":"                    else:"},{"line_number":119,"context_line":"                        del obj_cache[key]"},{"line_number":120,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa0c359_376f9f93","line":117,"updated":"2018-02-14 21:45:59.000000000","message":"Why switch from pop() to pop(0)? Doesn\u0027t that introduce a quadratic element?","commit_id":"c8297b2666e662975ee0ff8c5796ba42a4ed0716"},{"author":{"_account_id":14766,"name":"Kazuhiro MIYAHARA","email":"miyahara.kazuhiro@lab.ntt.co.jp","username":"miyahara"},"change_message_id":"94992d1a3d8cebe35aaf0ac1b0271c8501d5254f","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            while obj_cache:"},{"line_number":115,"context_line":"                for key in sorted(obj_cache):"},{"line_number":116,"context_line":"                    if obj_cache[key]:"},{"line_number":117,"context_line":"                        yield obj_cache[key].pop(0)"},{"line_number":118,"context_line":"                    else:"},{"line_number":119,"context_line":"                        del obj_cache[key]"},{"line_number":120,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa0c359_8e877d10","line":117,"in_reply_to":"3fa0c359_376f9f93","updated":"2018-02-15 02:40:14.000000000","message":"By using pop(), the order of (task_container, task_obj) is reversed. This change is to avoid reversing.\nThis may be a quadratic element... but I think this change make round_robin_order method more understandable.","commit_id":"c8297b2666e662975ee0ff8c5796ba42a4ed0716"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"fb0b197ae14653ec52d02b51780e1232c899b76f","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                    split_path(\u0027/\u0027 + target_path, 3, 3, True)"},{"line_number":131,"context_line":"                cache_key \u003d \u0027%s/%s\u0027 % (target_account, target_container)"},{"line_number":132,"context_line":"            except ValueError:"},{"line_number":133,"context_line":"                cache_key \u003d None"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"            obj_cache[cache_key].append((task_container, task_obj))"},{"line_number":136,"context_line":"            cnt +\u003d 1"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa0c359_7781a74a","line":133,"updated":"2018-02-14 21:45:59.000000000","message":"Out of curiosity, what trips this path? I see that it was like this before... but I thought we only expire *objects*, so I\u0027m left wondering what this is for...","commit_id":"c8297b2666e662975ee0ff8c5796ba42a4ed0716"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"16ecd84cdd4736dd3043e5b03e58334bdbdcaf1c","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                    split_path(\u0027/\u0027 + target_path, 3, 3, True)"},{"line_number":131,"context_line":"                cache_key \u003d \u0027%s/%s\u0027 % (target_account, target_container)"},{"line_number":132,"context_line":"            except ValueError:"},{"line_number":133,"context_line":"                cache_key \u003d None"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"            obj_cache[cache_key].append((task_container, task_obj))"},{"line_number":136,"context_line":"            cnt +\u003d 1"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa0c359_0dc4d691","line":133,"in_reply_to":"3fa0c359_7781a74a","updated":"2018-02-14 23:17:47.000000000","message":"Ah, got it -- https://review.openstack.org/#/c/543796/1 -- nothing should trip this :-)","commit_id":"c8297b2666e662975ee0ff8c5796ba42a4ed0716"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"fb0b197ae14653ec52d02b51780e1232c899b76f","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                for task_pair in dump_obj_cache_in_round_robin():"},{"line_number":140,"context_line":"                    yield task_pair"},{"line_number":141,"context_line":"                cnt \u003d 0"},{"line_number":142,"context_line":"        else:"},{"line_number":143,"context_line":"            for task_pair in dump_obj_cache_in_round_robin():"},{"line_number":144,"context_line":"                yield task_pair"},{"line_number":145,"context_line":"            for container in all_containers:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa0c359_5ca2924d","line":142,"updated":"2018-02-14 21:45:59.000000000","message":"Do we ever break? Could this block just be de-dented, instead?","commit_id":"c8297b2666e662975ee0ff8c5796ba42a4ed0716"},{"author":{"_account_id":14766,"name":"Kazuhiro MIYAHARA","email":"miyahara.kazuhiro@lab.ntt.co.jp","username":"miyahara"},"change_message_id":"94992d1a3d8cebe35aaf0ac1b0271c8501d5254f","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                for task_pair in dump_obj_cache_in_round_robin():"},{"line_number":140,"context_line":"                    yield task_pair"},{"line_number":141,"context_line":"                cnt \u003d 0"},{"line_number":142,"context_line":"        else:"},{"line_number":143,"context_line":"            for task_pair in dump_obj_cache_in_round_robin():"},{"line_number":144,"context_line":"                yield task_pair"},{"line_number":145,"context_line":"            for container in all_containers:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa0c359_cee025d0","line":142,"in_reply_to":"3fa0c359_5ca2924d","updated":"2018-02-15 02:40:14.000000000","message":"Done","commit_id":"c8297b2666e662975ee0ff8c5796ba42a4ed0716"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"fb0b197ae14653ec52d02b51780e1232c899b76f","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        \"\"\""},{"line_number":150,"context_line":"        Yields (task_container, task_obj) tuples to be executed"},{"line_number":151,"context_line":"        \"\"\""},{"line_number":152,"context_line":"        all_containers \u003d set()"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        for c in self.swift.iter_containers(self.expiring_objects_account):"},{"line_number":155,"context_line":"            task_container \u003d str(c[\u0027name\u0027])"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa0c359_5c493289","line":152,"updated":"2018-02-14 21:45:59.000000000","message":"OK, so we want a set here to de-dup, which lets us have a list above (since there will never be duplicates). Got it.\n\nI wonder if we should have something like\n\n first_container \u003d None\n for task_container, task_obj in task_iter:\n     if task_obj is None:\n         first_container \u003d task_container\n         break\n     ...\n for task_pair in dump_obj_cache_in_round_robin():\n     yield task_pair\n yield first_container, None\n for container_task in task_iter:\n     yield container_task\n\nabove and skip the buffering of containers...","commit_id":"c8297b2666e662975ee0ff8c5796ba42a4ed0716"},{"author":{"_account_id":14766,"name":"Kazuhiro MIYAHARA","email":"miyahara.kazuhiro@lab.ntt.co.jp","username":"miyahara"},"change_message_id":"94992d1a3d8cebe35aaf0ac1b0271c8501d5254f","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        \"\"\""},{"line_number":150,"context_line":"        Yields (task_container, task_obj) tuples to be executed"},{"line_number":151,"context_line":"        \"\"\""},{"line_number":152,"context_line":"        all_containers \u003d set()"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        for c in self.swift.iter_containers(self.expiring_objects_account):"},{"line_number":155,"context_line":"            task_container \u003d str(c[\u0027name\u0027])"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa0c359_8e5f7d71","line":152,"in_reply_to":"3fa0c359_5c493289","updated":"2018-02-15 02:40:14.000000000","message":"Umm... I think the above code forces task_iter to yield at least one (task_container, None) pair.\nActually, iter_cont_objs_to_expire yields one or more (task_container, None) pairs, but I don\u0027t like increasing restriction of args...","commit_id":"c8297b2666e662975ee0ff8c5796ba42a4ed0716"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"112cdfabbdf10991de8640812818689e6a61c6fe","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            while obj_cache:"},{"line_number":115,"context_line":"                for key in sorted(obj_cache):"},{"line_number":116,"context_line":"                    if obj_cache[key]:"},{"line_number":117,"context_line":"                        yield obj_cache[key].pop(0)"},{"line_number":118,"context_line":"                    else:"},{"line_number":119,"context_line":"                        del obj_cache[key]"},{"line_number":120,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3fa0c359_8fc44594","line":117,"updated":"2018-02-15 17:39:58.000000000","message":"OK, so what\u0027s the worst-case for how large any one list gets? MAX_OBJECTS_TO_CACHE, I suppose?\n\n $ python -m timeit -s \u0027x\u003dlist(range(100000))\u0027 \u0027while x: x.pop()\u0027\n 10000000 loops, best of 3: 0.0391 usec per loop\n\n $ python -m timeit -s \u0027x\u003dlist(range(100000))\u0027 \u0027while x: x.pop(0)\u0027\n 10 loops, best of 3: 160 msec per loop\n\nSeems not-insignificant. But, If we can be fairly certain that there will be enough variation in the target account/container that we\u0027ll only hit 1/10 that, things get much better:\n\n $ python -m timeit -s \u0027x\u003dlist(range(10000))\u0027 \u0027while x: x.pop()\u0027\n 10000000 loops, best of 3: 0.0361 usec per loop\n\n $ python -m timeit -s \u0027x\u003dlist(range(10000))\u0027 \u0027while x: x.pop(0)\u0027\n 10000000 loops, best of 3: 0.0385 usec per loop\n\nSo... IDK. How much do we want to take that risk?","commit_id":"d8754818c35299997a6c9f2b5b1610313786285b"},{"author":{"_account_id":14766,"name":"Kazuhiro MIYAHARA","email":"miyahara.kazuhiro@lab.ntt.co.jp","username":"miyahara"},"change_message_id":"50ea6fb57fbf5c0e8697439e4cc9d0352fefda4e","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            while obj_cache:"},{"line_number":115,"context_line":"                for key in sorted(obj_cache):"},{"line_number":116,"context_line":"                    if obj_cache[key]:"},{"line_number":117,"context_line":"                        yield obj_cache[key].pop(0)"},{"line_number":118,"context_line":"                    else:"},{"line_number":119,"context_line":"                        del obj_cache[key]"},{"line_number":120,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3fa0c359_e344cf49","line":117,"in_reply_to":"3fa0c359_8fc44594","updated":"2018-02-19 08:39:06.000000000","message":"I see, pop(0) of list type takes O(n) time. I think we should use another data type.\nI think deque type is nice. If we use deque, we can append and pop with O(1) time. So I updated the type.\n\nFollowings are results in my environment:\n\n$ python -m timeit -s \u0027x\u003dlist(range(100000))\u0027 \u0027while x: x.pop()\u0027\n100000000 loops, best of 3: 0.0192 usec per loop\n\n$ python -m timeit -s \u0027x\u003dlist(range(100000))\u0027 \u0027while x: x.pop(0)\u0027\n10 loops, best of 3: 120 msec per loop\n\n$ python -m timeit -s \u0027from collections import deque; x\u003ddeque(range(100000))\u0027 \u0027while x: x.pop()\u0027\n10000000 loops, best of 3: 0.0201 usec per loop\n\n$ python -m timeit -s \u0027from collections import deque; x\u003ddeque(range(100000))\u0027 \u0027while x: x.popleft()\u0027\n10000000 loops, best of 3: 0.0203 usec per loop","commit_id":"d8754818c35299997a6c9f2b5b1610313786285b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"4b18d59b6a0f0ec69be114e258cf52fb1550af9b","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                             \u0027time\u0027: elapsed, \u0027objects\u0027: self.report_objects})"},{"line_number":96,"context_line":"            self.report_last_time \u003d time()"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def round_robin_order(self, task_iter):"},{"line_number":99,"context_line":"        \"\"\""},{"line_number":100,"context_line":"        Change order of expiration tasks to avoid deleting objects in a"},{"line_number":101,"context_line":"        certain container continuously."}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa0c359_5ebc4305","line":98,"updated":"2018-02-21 05:33:17.000000000","message":"This is a nice, fairly-pure function -- we could even pull it up and out of the ObjectExpirer class if we wanted! Then switch MAX_OBJECTS_TO_CACHE to an arg, and accept a cache_key lambda...\n\nNah, let\u0027s quit while we\u0027re ahead. YANGI, or if we *do*, we\u0027re at least at a much better starting point for pulling it out more later.","commit_id":"d163bc26303958cf8bbc804af2abbe3f20640a93"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"4b18d59b6a0f0ec69be114e258cf52fb1550af9b","unresolved":false,"context_lines":[{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def iter_task_containers_to_expire(self):"},{"line_number":137,"context_line":"        \"\"\""},{"line_number":138,"context_line":"        Yields contaienr name under the expiring_objects_account if"},{"line_number":139,"context_line":"        the container name (i.e. timestamp) is past."},{"line_number":140,"context_line":"        \"\"\""},{"line_number":141,"context_line":"        for c in self.swift.iter_containers(self.expiring_objects_account):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa0c359_d8470a77","line":138,"range":{"start_line":138,"start_character":15,"end_line":138,"end_character":24},"updated":"2018-02-21 05:33:17.000000000","message":"s/contaienr/container/\n\nPersonally, I do \"cotnainer\" or \"cnotainer\" a lot, too ;-)","commit_id":"d163bc26303958cf8bbc804af2abbe3f20640a93"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"566ec0293ec9cf4b0837a8d87ed5808fcb8e4a87","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                if err.resp.status_int not in {HTTP_NOT_FOUND,"},{"line_number":285,"context_line":"                                               HTTP_PRECONDITION_FAILED}:"},{"line_number":286,"context_line":"                    raise"},{"line_number":287,"context_line":"                if float(delete_timestamp) \u003e time() - self.reclaim_age:"},{"line_number":288,"context_line":"                    # we\u0027ll have to retry the DELETE later"},{"line_number":289,"context_line":"                    raise"},{"line_number":290,"context_line":"            self.pop_queue(task_container, task_object)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa0c359_5c950ee3","line":287,"updated":"2018-02-22 09:45:53.000000000","message":"If we expects delete_timestamp as Timestamp class here, we can cleanup this if condition. That\u0027s overkill within this patch though. Let\u0027s do it later.","commit_id":"d163bc26303958cf8bbc804af2abbe3f20640a93"}],"test/unit/obj/test_expirer.py":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"6e4340c7303f46b251e1c36f3b9063aa8451ae37","unresolved":false,"context_lines":[{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def test_round_robin_order(self):"},{"line_number":300,"context_line":"        x \u003d expirer.ObjectExpirer(self.conf, logger\u003dself.logger)"},{"line_number":301,"context_line":"        task_con_obj_iter \u003d (_ for _ in ["},{"line_number":302,"context_line":"            (\u00270000\u0027, \u00270000-a/c0/o0\u0027), (\u00270000\u0027, \u00270000-a/c0/o1\u0027),"},{"line_number":303,"context_line":"            (\u00270001\u0027, \u00270001-a/c1/o0\u0027), (\u00270001\u0027, \u00270001-a/c1/o1\u0027),"},{"line_number":304,"context_line":"            (\u00270002\u0027, \u00270002-a/c2/o0\u0027), (\u00270002\u0027, \u00270002-a/c2/o1\u0027),"},{"line_number":305,"context_line":"            (\u00270000\u0027, None), (\u00270001\u0027, None), (\u00270002\u0027, None)])"},{"line_number":306,"context_line":"        result \u003d [_ for _ in x.round_robin_order(task_con_obj_iter)]"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"        self.assertEqual(set([_[0] for _ in result[:3]]),"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f93b717_6eb91b13","line":305,"range":{"start_line":301,"start_character":0,"end_line":305,"end_character":60},"updated":"2018-02-01 02:06:46.000000000","message":"we don\u0027t have to wrap with tuple and for loop. Just the list is enough to define.","commit_id":"9a43c9df3013913a6cac23e126565ccb45ff693c"},{"author":{"_account_id":14766,"name":"Kazuhiro MIYAHARA","email":"miyahara.kazuhiro@lab.ntt.co.jp","username":"miyahara"},"change_message_id":"155737b2109acf4ba8d447fa4c076635d24fdf1a","unresolved":false,"context_lines":[{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def test_round_robin_order(self):"},{"line_number":300,"context_line":"        x \u003d expirer.ObjectExpirer(self.conf, logger\u003dself.logger)"},{"line_number":301,"context_line":"        task_con_obj_iter \u003d (_ for _ in ["},{"line_number":302,"context_line":"            (\u00270000\u0027, \u00270000-a/c0/o0\u0027), (\u00270000\u0027, \u00270000-a/c0/o1\u0027),"},{"line_number":303,"context_line":"            (\u00270001\u0027, \u00270001-a/c1/o0\u0027), (\u00270001\u0027, \u00270001-a/c1/o1\u0027),"},{"line_number":304,"context_line":"            (\u00270002\u0027, \u00270002-a/c2/o0\u0027), (\u00270002\u0027, \u00270002-a/c2/o1\u0027),"},{"line_number":305,"context_line":"            (\u00270000\u0027, None), (\u00270001\u0027, None), (\u00270002\u0027, None)])"},{"line_number":306,"context_line":"        result \u003d [_ for _ in x.round_robin_order(task_con_obj_iter)]"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"        self.assertEqual(set([_[0] for _ in result[:3]]),"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f93b717_7a1555e4","line":305,"range":{"start_line":301,"start_character":0,"end_line":305,"end_character":60},"in_reply_to":"5f93b717_6eb91b13","updated":"2018-02-01 06:28:21.000000000","message":"Done.\nI wrapped the list because the main expirer code had two for-loops. In the previous implementation, list is iterated twice and generator is iterated once.\nBut, I changed the implementation. So we can use list directly.","commit_id":"9a43c9df3013913a6cac23e126565ccb45ff693c"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"6e4340c7303f46b251e1c36f3b9063aa8451ae37","unresolved":false,"context_lines":[{"line_number":303,"context_line":"            (\u00270001\u0027, \u00270001-a/c1/o0\u0027), (\u00270001\u0027, \u00270001-a/c1/o1\u0027),"},{"line_number":304,"context_line":"            (\u00270002\u0027, \u00270002-a/c2/o0\u0027), (\u00270002\u0027, \u00270002-a/c2/o1\u0027),"},{"line_number":305,"context_line":"            (\u00270000\u0027, None), (\u00270001\u0027, None), (\u00270002\u0027, None)])"},{"line_number":306,"context_line":"        result \u003d [_ for _ in x.round_robin_order(task_con_obj_iter)]"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"        self.assertEqual(set([_[0] for _ in result[:3]]),"},{"line_number":309,"context_line":"                         set([\u00270000\u0027, \u00270001\u0027, \u00270002\u0027]))"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f93b717_0e3ad797","line":306,"updated":"2018-02-01 02:06:46.000000000","message":"list(x.round_robin_order(task_con_obj_iter) is enough here.","commit_id":"9a43c9df3013913a6cac23e126565ccb45ff693c"},{"author":{"_account_id":14766,"name":"Kazuhiro MIYAHARA","email":"miyahara.kazuhiro@lab.ntt.co.jp","username":"miyahara"},"change_message_id":"155737b2109acf4ba8d447fa4c076635d24fdf1a","unresolved":false,"context_lines":[{"line_number":303,"context_line":"            (\u00270001\u0027, \u00270001-a/c1/o0\u0027), (\u00270001\u0027, \u00270001-a/c1/o1\u0027),"},{"line_number":304,"context_line":"            (\u00270002\u0027, \u00270002-a/c2/o0\u0027), (\u00270002\u0027, \u00270002-a/c2/o1\u0027),"},{"line_number":305,"context_line":"            (\u00270000\u0027, None), (\u00270001\u0027, None), (\u00270002\u0027, None)])"},{"line_number":306,"context_line":"        result \u003d [_ for _ in x.round_robin_order(task_con_obj_iter)]"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"        self.assertEqual(set([_[0] for _ in result[:3]]),"},{"line_number":309,"context_line":"                         set([\u00270000\u0027, \u00270001\u0027, \u00270002\u0027]))"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f93b717_9afb81bf","line":306,"in_reply_to":"5f93b717_0e3ad797","updated":"2018-02-01 06:28:21.000000000","message":"Done","commit_id":"9a43c9df3013913a6cac23e126565ccb45ff693c"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"6e4340c7303f46b251e1c36f3b9063aa8451ae37","unresolved":false,"context_lines":[{"line_number":305,"context_line":"            (\u00270000\u0027, None), (\u00270001\u0027, None), (\u00270002\u0027, None)])"},{"line_number":306,"context_line":"        result \u003d [_ for _ in x.round_robin_order(task_con_obj_iter)]"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"        self.assertEqual(set([_[0] for _ in result[:3]]),"},{"line_number":309,"context_line":"                         set([\u00270000\u0027, \u00270001\u0027, \u00270002\u0027]))"},{"line_number":310,"context_line":"        self.assertEqual(set([_[0] for _ in result[3:6]]),"},{"line_number":311,"context_line":"                         set([\u00270000\u0027, \u00270001\u0027, \u00270002\u0027]))"},{"line_number":312,"context_line":"        self.assertEqual(result[6:],"},{"line_number":313,"context_line":"                         [(\u00270000\u0027, None), (\u00270001\u0027, None), (\u00270002\u0027, None)])"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def test_run_once_nothing_to_do(self):"},{"line_number":316,"context_line":"        x \u003d expirer.ObjectExpirer(self.conf, logger\u003dself.logger)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f93b717_0e63b7b3","line":313,"range":{"start_line":308,"start_character":0,"end_line":313,"end_character":74},"updated":"2018-02-01 02:06:46.000000000","message":"I don\u0027t like the assertions to check only the keys.\n\nI tried to check whole sorted result with [1], it looks strange because 6 more duplicated (\u003ckey\u003e, None) appeared in the result.\n\n1: https://gist.github.com/bloodeagle40234/837b40d3b4da03cf18f880ebc60a57af","commit_id":"9a43c9df3013913a6cac23e126565ccb45ff693c"},{"author":{"_account_id":14766,"name":"Kazuhiro MIYAHARA","email":"miyahara.kazuhiro@lab.ntt.co.jp","username":"miyahara"},"change_message_id":"155737b2109acf4ba8d447fa4c076635d24fdf1a","unresolved":false,"context_lines":[{"line_number":305,"context_line":"            (\u00270000\u0027, None), (\u00270001\u0027, None), (\u00270002\u0027, None)])"},{"line_number":306,"context_line":"        result \u003d [_ for _ in x.round_robin_order(task_con_obj_iter)]"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"        self.assertEqual(set([_[0] for _ in result[:3]]),"},{"line_number":309,"context_line":"                         set([\u00270000\u0027, \u00270001\u0027, \u00270002\u0027]))"},{"line_number":310,"context_line":"        self.assertEqual(set([_[0] for _ in result[3:6]]),"},{"line_number":311,"context_line":"                         set([\u00270000\u0027, \u00270001\u0027, \u00270002\u0027]))"},{"line_number":312,"context_line":"        self.assertEqual(result[6:],"},{"line_number":313,"context_line":"                         [(\u00270000\u0027, None), (\u00270001\u0027, None), (\u00270002\u0027, None)])"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def test_run_once_nothing_to_do(self):"},{"line_number":316,"context_line":"        x \u003d expirer.ObjectExpirer(self.conf, logger\u003dself.logger)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f93b717_7aed55b5","line":313,"range":{"start_line":308,"start_character":0,"end_line":313,"end_character":74},"in_reply_to":"5f93b717_0e63b7b3","updated":"2018-02-01 06:28:21.000000000","message":"OK. I think your suggestion is good idea.\nThe strange duplicated pairs come from combination of two for-loops in main code and using list. But it is fixed now.","commit_id":"9a43c9df3013913a6cac23e126565ccb45ff693c"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"4b18d59b6a0f0ec69be114e258cf52fb1550af9b","unresolved":false,"context_lines":[{"line_number":595,"context_line":"            \u0027Exception while deleting container %d failed to delete \u0027"},{"line_number":596,"context_line":"            \u0027container: \u0027 % (cts,),"},{"line_number":597,"context_line":"            \u0027Exception while deleting container %d failed to delete \u0027"},{"line_number":598,"context_line":"            \u0027container: \u0027 % (cts + 1,)]))"},{"line_number":599,"context_line":"        self.assertEqual(x.logger.get_lines_for_level(\u0027info\u0027), ["},{"line_number":600,"context_line":"            \u0027Pass beginning; 2 possible containers; 4 possible objects\u0027,"},{"line_number":601,"context_line":"            \u0027Pass completed in 0s; 0 objects expired\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa0c359_5eb52331","line":598,"updated":"2018-02-21 05:33:17.000000000","message":"Interesting. This seems to be the only test to make assertions about us deleting containers...\n\nGlad we\u0027ve got at least one, I suppose!","commit_id":"d163bc26303958cf8bbc804af2abbe3f20640a93"}]}
