)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e733c56ee0a39e574a29b13cc6db065fa0dfcfd7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"eca21521_8523e93b","updated":"2024-05-15 02:30:27.000000000","message":"I\u0027d like to squash this into the Carrying patch, the MAX_TASK_CONTAINER_TO_CACHE idea isn\u0027t really an important implementation detail and it makes it a little cleaner to refactor the task_container iteration later if can assume the expirer can list the whole account and put all the container in a single list of probably \u003c10K containers.  N.B. that\u0027s exactly what master does today:\n\nhttps://review.opendev.org/c/openstack/swift/+/914713/14/swift/obj/expirer.py#b401","commit_id":"935f431bb8e49cf7f42a52c5eb035d43fbf9e50a"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"c6442d4a341edc60ae21d5df09c9561cda5138e8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"7f0885c9_4ef8cbc9","updated":"2024-05-17 05:33:14.000000000","message":"functionality wise, I feel it\u0027s okay to shuffle the whole list of task containers, but do we need to worry about the limitation of ``random.shuffle``? see https://docs.python.org/3/library/random.html#random.shuffle\nif so, we need keep MAX_TASK_CONTAINER_TO_CACHE and set default value as ``2000``?","commit_id":"935f431bb8e49cf7f42a52c5eb035d43fbf9e50a"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"6f4dbcf0d24dfe181f0306de9a5a0a6d3eaba954","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"b6dfb8c2_68ae64b2","updated":"2024-05-17 15:13:25.000000000","message":"squashed 914713: DNM expirer: new options to control task iteration | https://review.opendev.org/c/openstack/swift/+/914713","commit_id":"935f431bb8e49cf7f42a52c5eb035d43fbf9e50a"}],"swift/obj/expirer.py":[{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"c6442d4a341edc60ae21d5df09c9561cda5138e8","unresolved":true,"context_lines":[{"line_number":317,"context_line":"            if timestamp \u003e Timestamp.now():"},{"line_number":318,"context_line":"                break"},{"line_number":319,"context_line":"            container_list.append(task_container)"},{"line_number":320,"context_line":"        if self.task_container_iteration_strategy \u003d\u003d \u0027randomized\u0027:"},{"line_number":321,"context_line":"            shuffle(container_list)"},{"line_number":322,"context_line":"        for task_container in container_list:"},{"line_number":323,"context_line":"            yield task_account, task_container"}],"source_content_type":"text/x-python","patch_set":1,"id":"6707f364_431eeede","line":320,"updated":"2024-05-17 05:33:14.000000000","message":"okay, the new plan is to shuffle the whole list of task containers. do we need to worry about this? https://review.opendev.org/c/openstack/swift/+/914713/comment/77b3fc21_7424e7a4/","commit_id":"935f431bb8e49cf7f42a52c5eb035d43fbf9e50a"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"6f4dbcf0d24dfe181f0306de9a5a0a6d3eaba954","unresolved":false,"context_lines":[{"line_number":317,"context_line":"            if timestamp \u003e Timestamp.now():"},{"line_number":318,"context_line":"                break"},{"line_number":319,"context_line":"            container_list.append(task_container)"},{"line_number":320,"context_line":"        if self.task_container_iteration_strategy \u003d\u003d \u0027randomized\u0027:"},{"line_number":321,"context_line":"            shuffle(container_list)"},{"line_number":322,"context_line":"        for task_container in container_list:"},{"line_number":323,"context_line":"            yield task_account, task_container"}],"source_content_type":"text/x-python","patch_set":1,"id":"5c24777d_f96a8c4f","line":320,"in_reply_to":"14b0f269_b33a0a96","updated":"2024-05-17 15:13:25.000000000","message":"\u003e int too large to convert to float\n\nLOL, yes Al is right - nice test ;)\n\n\u003e When the comment was introduced, Python\u0027s Wichmann-Hill generator had a much shorter period, and we couldn\u0027t even generate all the permutations of a deck of cards\n\n```\n\u003e\u003e\u003e math.factorial(52)\n80658175170943878571660636856403766975289505440883277824000000000000\n```\n\n\"we couldn\u0027t even\" ROFL\n\nI think \"we have a few thousand nodes and want them to each mostly not all start listing on the same container everytime\" is going to work as we expect.","commit_id":"935f431bb8e49cf7f42a52c5eb035d43fbf9e50a"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ef1c70b24b11bffb431e4c9de920b262854b5b4f","unresolved":true,"context_lines":[{"line_number":317,"context_line":"            if timestamp \u003e Timestamp.now():"},{"line_number":318,"context_line":"                break"},{"line_number":319,"context_line":"            container_list.append(task_container)"},{"line_number":320,"context_line":"        if self.task_container_iteration_strategy \u003d\u003d \u0027randomized\u0027:"},{"line_number":321,"context_line":"            shuffle(container_list)"},{"line_number":322,"context_line":"        for task_container in container_list:"},{"line_number":323,"context_line":"            yield task_account, task_container"}],"source_content_type":"text/x-python","patch_set":1,"id":"14b0f269_b33a0a96","line":320,"in_reply_to":"6707f364_431eeede","updated":"2024-05-17 11:57:00.000000000","message":"I don\u0027t think the doc is saying that random.shuffle will produce at most 2080 permutations. I think it is saying that for a sequence length greater than 2080, not all permutations will be generated. But there\u0027s still a very large number of permutations that will be generated.\nhttps://stackoverflow.com/questions/3062741/maximal-length-of-list-to-shuffle-with-python-random-shuffle\n\nhttps://paste.openstack.org/show/bslzU9VposUHOvlyE67s/","commit_id":"935f431bb8e49cf7f42a52c5eb035d43fbf9e50a"}]}
