)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"a1fd08aac3a29ac9971857f021b8a075613f8b1e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"8a4a771f_599aa132","updated":"2025-03-05 19:03:21.000000000","message":"this is the same concurrent request test case for CooperativeCachePopulator itself, but what we need is this kind of test case for shard range usage at the proxy-server.\n\nFor example, if you look at test case ``test_get_backend_updating_shard_with_cooperative_token_acquired`` in the proxy patch which applies cooperative token to the shard range path, it mocks the shard range data returned from container server, and then issues PUT/POST/DELETE requests into proxy object controller which would internally use cooperative token to fetch shard range from backend, and then check stats to make sure everything works as expected. But this test case only test one request at one time.\n\nWe would need this test case ``test_concurrent_requests`` to issue many requests at the same time, similar to the setup of the concurrent unit test in the base patch, but at the proxy-server layer, issue many inflight PUT/POST/DELETE requests; and expect only 3 of them to acquire cooperative token and go to the backend, and 97 of them won\u0027t get token and get the shard range out of cache eventually after waiting in the queue.","commit_id":"e737de5e64204f722e200a38cdc4ff23da6133ea"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"503db87995b4183df31cd57dde534dd8793e1b53","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":18,"id":"3bbf53ef_ba9fcc78","updated":"2025-05-19 22:02:50.000000000","message":"Could we fix the merge conflicts on this patch ?","commit_id":"b1ba76f1de3ab98f40d5f8923f230120f5d221cb"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"f5334f632f4136e1fa236072e81a7e4a6f3fdda9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":18,"id":"51a77749_6439ecd0","in_reply_to":"3bbf53ef_ba9fcc78","updated":"2025-08-22 22:28:52.000000000","message":"Done","commit_id":"b1ba76f1de3ab98f40d5f8923f230120f5d221cb"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"92ef56740ebbbe8c0b3dcea990cce86db1eeda2e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":19,"id":"4bc0c95b_3af867b9","updated":"2025-06-30 06:00:37.000000000","message":"Just used gerrit to rebase on parent because it was in merge conflict","commit_id":"80c1af9b3fc8e47e9004dd7a82c362e6d92f8432"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"68fa9e518792171ce8d38f761f7806e941238078","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":21,"id":"c543923a_72b69ce0","updated":"2025-08-13 22:39:22.000000000","message":"recheck","commit_id":"92e59b8a88c6561d43e285fdeda32838320c8849"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"18605a1503fdc870080fef230d074492a7ed82ec","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"e2b9a25a_91d58066","updated":"2025-08-22 22:11:20.000000000","message":"statsd metrics has been converted to label metrics, patch needs changes accordingly.","commit_id":"526b65a41fcc36faaa8b3ec1d1583fc0058121f3"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"f6381b4dffc8c2220761aa8e989a8aeb66a189dd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":24,"id":"a4c80e38_0fd9ec6b","updated":"2025-08-27 02:09:12.000000000","message":"recheck","commit_id":"ec996e312722d2d2b18dc82b736ea688007901ca"}],"test/unit/__init__.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"7c9cf2beb90e3240ef3511d0a6eb7aa44972af87","unresolved":true,"context_lines":[{"line_number":1064,"context_line":"        A green thread-local FakeConn instance."},{"line_number":1065,"context_line":"    \"\"\""},{"line_number":1066,"context_line":""},{"line_number":1067,"context_line":"    class FakeConn(object):"},{"line_number":1068,"context_line":""},{"line_number":1069,"context_line":"        def __init__(self, status, headers\u003dNone, body\u003d\u0027\u0027, **kwargs):"},{"line_number":1070,"context_line":"            self.status \u003d status"}],"source_content_type":"text/x-python","patch_set":11,"id":"85509119_3928f0fd","line":1067,"updated":"2025-04-04 16:47:26.000000000","message":"I only took a quick look over this but it reminded me of the onflation of cocnerns in FakeConn that I tried to separate in this patch https://review.opendev.org/c/openstack/swift/+/930595/\n\nIt would be great of we could avoid repeating the mixed concerns here - IDK if we could achieve a single FakeConnResponse class that is used here and in the original FakeConn, if I pushed on https://review.opendev.org/c/openstack/swift/+/930595/ some more??","commit_id":"ec8c617843aebc0eb097456a69104929245d6dc9"}],"test/unit/proxy/test_server.py":[{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"ca83a76d3e25ea98cd3d903b54749183a13a8bd0","unresolved":true,"context_lines":[{"line_number":5098,"context_line":"            req \u003d Request.blank("},{"line_number":5099,"context_line":"                \u0027/v1/a/c/o\u0027, {\u0027swift.cache\u0027: FakeMemcache()},"},{"line_number":5100,"context_line":"                method\u003dmethod, body\u003d\u0027\u0027, headers\u003d{\u0027Content-Type\u0027: \u0027text/plain\u0027})"},{"line_number":5101,"context_line":"            status_codes \u003d (200, 200, 200, 202, 202)"},{"line_number":5102,"context_line":"            resp_headers \u003d {\u0027X-Backend-Storage-Policy-Index\u0027: 1,"},{"line_number":5103,"context_line":"                            \u0027x-backend-sharding-state\u0027: sharding_state,"},{"line_number":5104,"context_line":"                            \u0027X-Backend-Record-Type\u0027: \u0027shard\u0027}"}],"source_content_type":"text/x-python","patch_set":5,"id":"18adee5b_c1f9de26","line":5101,"updated":"2025-03-11 01:21:37.000000000","message":"without ``sleep_mock``, ``mocked_http_conn`` used below 6 status codes:\n```\nstatus_codes \u003d (200, 200, 200, 202, 202, 202)\n```\nand they are\n```\n200 - Account HEAD request: Checking if the account exists\n200 - Container HEAD request: Checking if the container exists\n200 - Container shard GET request: Getting updating shard ranges\n202 - Object POST request (to first backend): Updating the object\n202 - Object POST request (to second backend): Updating the object\n202 - Object POST request (to third backend): Updating the object\n```\n\nsince now you are adding the ``sleep_mock`` function to return the shard ranges, the ``status_codes`` mock along with ``mocked_http_conn`` should become\n```\nstatus_codes \u003d (200, 200, 202, 202, 202)\n```","commit_id":"000001ed034cbdae002db286f398d43abe6ea28b"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"709de4679983b8af6d66973e57a027ec945b4750","unresolved":false,"context_lines":[{"line_number":5098,"context_line":"            req \u003d Request.blank("},{"line_number":5099,"context_line":"                \u0027/v1/a/c/o\u0027, {\u0027swift.cache\u0027: FakeMemcache()},"},{"line_number":5100,"context_line":"                method\u003dmethod, body\u003d\u0027\u0027, headers\u003d{\u0027Content-Type\u0027: \u0027text/plain\u0027})"},{"line_number":5101,"context_line":"            status_codes \u003d (200, 200, 200, 202, 202)"},{"line_number":5102,"context_line":"            resp_headers \u003d {\u0027X-Backend-Storage-Policy-Index\u0027: 1,"},{"line_number":5103,"context_line":"                            \u0027x-backend-sharding-state\u0027: sharding_state,"},{"line_number":5104,"context_line":"                            \u0027X-Backend-Record-Type\u0027: \u0027shard\u0027}"}],"source_content_type":"text/x-python","patch_set":5,"id":"15757f02_53f46bde","line":5101,"in_reply_to":"18adee5b_c1f9de26","updated":"2025-03-11 15:10:29.000000000","message":"Acknowledged","commit_id":"000001ed034cbdae002db286f398d43abe6ea28b"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"ca83a76d3e25ea98cd3d903b54749183a13a8bd0","unresolved":true,"context_lines":[{"line_number":5119,"context_line":"                    \u0027swift.proxy.controllers.obj.BaseObjectController.\u0027"},{"line_number":5120,"context_line":"                    \u0027_get_backend_updating_namespaces\u0027,"},{"line_number":5121,"context_line":"                    sleep_mock(body, resp_headers)) as populator:"},{"line_number":5122,"context_line":"                    populator \u003d body, resp_headers"},{"line_number":5123,"context_line":"                    resp \u003d req.get_response(self.app)"},{"line_number":5124,"context_line":""},{"line_number":5125,"context_line":"            self.assertEqual(resp.status_int, 202)"}],"source_content_type":"text/x-python","patch_set":5,"id":"af423065_b912504c","line":5122,"updated":"2025-03-11 01:21:37.000000000","message":"remove this since you have ``body, resp_headers`` mocked within ``sleep_mock`` already","commit_id":"000001ed034cbdae002db286f398d43abe6ea28b"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"709de4679983b8af6d66973e57a027ec945b4750","unresolved":false,"context_lines":[{"line_number":5119,"context_line":"                    \u0027swift.proxy.controllers.obj.BaseObjectController.\u0027"},{"line_number":5120,"context_line":"                    \u0027_get_backend_updating_namespaces\u0027,"},{"line_number":5121,"context_line":"                    sleep_mock(body, resp_headers)) as populator:"},{"line_number":5122,"context_line":"                    populator \u003d body, resp_headers"},{"line_number":5123,"context_line":"                    resp \u003d req.get_response(self.app)"},{"line_number":5124,"context_line":""},{"line_number":5125,"context_line":"            self.assertEqual(resp.status_int, 202)"}],"source_content_type":"text/x-python","patch_set":5,"id":"251fb87a_c5e532a5","line":5122,"in_reply_to":"af423065_b912504c","updated":"2025-03-11 15:10:29.000000000","message":"Done","commit_id":"000001ed034cbdae002db286f398d43abe6ea28b"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"56005aabdade827c637264a8c9bf50e399fa39cb","unresolved":true,"context_lines":[{"line_number":5147,"context_line":"                \"object.shard_updating.cache.miss.200\": 0,"},{"line_number":5148,"context_line":"                \"object.shard_updating.cache.set\": 0,"},{"line_number":5149,"context_line":"                \"token.shard_updating.backend_reqs.with_token.200\": 0,"},{"line_number":5150,"context_line":"                \"token.shard_updating.done_token_reqs\": 0,"},{"line_number":5151,"context_line":"            },"},{"line_number":5152,"context_line":"            stats,"},{"line_number":5153,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":6,"id":"0e9313a0_df15c780","line":5150,"updated":"2025-03-11 20:18:13.000000000","message":"We would need this test case ``test_concurrent_requests`` to issue many requests (like 100) at the same time, similar to the setup of the concurrent unit test in the base patch, issue many inflight PUT/POST/DELETE requests; and expect only 3 of them to acquire cooperative token and go to the backend, and 97 of them won\u0027t get token and get the shard range out of cache eventually after waiting in the queue.\n\nSo the stats will be like \n```\n                \"token.shard_updating.backend_reqs.with_token.200\": 3,\n                \"token.shard_updating.done_token_reqs\": 3,\n                \u0027token.shard_updating.cache_served_reqs\u0027: 97\n```\n\nsee: https://review.opendev.org/c/openstack/swift/+/890174/41/test/unit/common/test_utils.py#3444","commit_id":"3a5e43c2c7c32a8c8a350c3fc156b9c63f6be247"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"b20f5ee1b60b9f89f9be029c954dd158936b3a16","unresolved":false,"context_lines":[{"line_number":5147,"context_line":"                \"object.shard_updating.cache.miss.200\": 0,"},{"line_number":5148,"context_line":"                \"object.shard_updating.cache.set\": 0,"},{"line_number":5149,"context_line":"                \"token.shard_updating.backend_reqs.with_token.200\": 0,"},{"line_number":5150,"context_line":"                \"token.shard_updating.done_token_reqs\": 0,"},{"line_number":5151,"context_line":"            },"},{"line_number":5152,"context_line":"            stats,"},{"line_number":5153,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":6,"id":"f9ab7224_c64c5de7","line":5150,"in_reply_to":"0e9313a0_df15c780","updated":"2025-04-07 02:45:21.000000000","message":"Done","commit_id":"3a5e43c2c7c32a8c8a350c3fc156b9c63f6be247"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"259ce60ec25c2781fe2ca0d8b3e073d7af39a203","unresolved":true,"context_lines":[{"line_number":5070,"context_line":"    def test_cooperative_token_memcache_with_sleep(self):"},{"line_number":5071,"context_line":"        num_processes \u003d 100"},{"line_number":5072,"context_line":"        retry_interval \u003d 0.01"},{"line_number":5073,"context_line":"        stats \u003d {"},{"line_number":5074,"context_line":"            \"account.info.cache.miss.200\": 0,"},{"line_number":5075,"context_line":"            \"account.info.infocache.hit\": 0,"},{"line_number":5076,"context_line":"            \"container.info.cache.miss.200\": 0,"}],"source_content_type":"text/x-python","patch_set":7,"id":"2bd1289b_ad00608e","line":5073,"updated":"2025-03-17 05:17:53.000000000","message":"as discussed offline, we should be able to use one share debug logger for all the green threads within this test case.","commit_id":"88bbf8f3faa0f9d7e535292076c815130adaef86"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"80ab358327419b84a3c381b5ff2ae2ab81827ac8","unresolved":false,"context_lines":[{"line_number":5070,"context_line":"    def test_cooperative_token_memcache_with_sleep(self):"},{"line_number":5071,"context_line":"        num_processes \u003d 100"},{"line_number":5072,"context_line":"        retry_interval \u003d 0.01"},{"line_number":5073,"context_line":"        stats \u003d {"},{"line_number":5074,"context_line":"            \"account.info.cache.miss.200\": 0,"},{"line_number":5075,"context_line":"            \"account.info.infocache.hit\": 0,"},{"line_number":5076,"context_line":"            \"container.info.cache.miss.200\": 0,"}],"source_content_type":"text/x-python","patch_set":7,"id":"2b252a13_159fd8dd","line":5073,"in_reply_to":"2bd1289b_ad00608e","updated":"2025-03-21 16:27:27.000000000","message":"Done","commit_id":"88bbf8f3faa0f9d7e535292076c815130adaef86"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"259ce60ec25c2781fe2ca0d8b3e073d7af39a203","unresolved":true,"context_lines":[{"line_number":5099,"context_line":"        def do_test(method, sharding_state):"},{"line_number":5100,"context_line":"            self.app.logger.clear()  # clean capture state"},{"line_number":5101,"context_line":"            req \u003d Request.blank("},{"line_number":5102,"context_line":"                \u0027/v1/a/c/o\u0027, {\u0027swift.cache\u0027: FakeMemcache()},"},{"line_number":5103,"context_line":"                method\u003dmethod, body\u003d\u0027\u0027, headers\u003d{\u0027Content-Type\u0027: \u0027text/plain\u0027})"},{"line_number":5104,"context_line":"            status_codes \u003d (200, 200, 202, 202, 202)"},{"line_number":5105,"context_line":"            resp_headers \u003d {\u0027X-Backend-Storage-Policy-Index\u0027: 1,"}],"source_content_type":"text/x-python","patch_set":7,"id":"93e6b1f7_6b46b1c2","line":5102,"updated":"2025-03-17 05:17:53.000000000","message":"mock Memcache instance needs to be shared across all test green threads.","commit_id":"88bbf8f3faa0f9d7e535292076c815130adaef86"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"80ab358327419b84a3c381b5ff2ae2ab81827ac8","unresolved":false,"context_lines":[{"line_number":5099,"context_line":"        def do_test(method, sharding_state):"},{"line_number":5100,"context_line":"            self.app.logger.clear()  # clean capture state"},{"line_number":5101,"context_line":"            req \u003d Request.blank("},{"line_number":5102,"context_line":"                \u0027/v1/a/c/o\u0027, {\u0027swift.cache\u0027: FakeMemcache()},"},{"line_number":5103,"context_line":"                method\u003dmethod, body\u003d\u0027\u0027, headers\u003d{\u0027Content-Type\u0027: \u0027text/plain\u0027})"},{"line_number":5104,"context_line":"            status_codes \u003d (200, 200, 202, 202, 202)"},{"line_number":5105,"context_line":"            resp_headers \u003d {\u0027X-Backend-Storage-Policy-Index\u0027: 1,"}],"source_content_type":"text/x-python","patch_set":7,"id":"0bea4d23_1e96ea7d","line":5102,"in_reply_to":"93e6b1f7_6b46b1c2","updated":"2025-03-21 16:27:27.000000000","message":"Done","commit_id":"88bbf8f3faa0f9d7e535292076c815130adaef86"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"259ce60ec25c2781fe2ca0d8b3e073d7af39a203","unresolved":true,"context_lines":[{"line_number":5122,"context_line":"                        \u0027swift.proxy.controllers.obj.BaseObjectController.\u0027"},{"line_number":5123,"context_line":"                        \u0027_get_backend_updating_namespaces\u0027,"},{"line_number":5124,"context_line":"                        delayed_do_fetch_backend(body, resp_headers))\\"},{"line_number":5125,"context_line":"                    as populator:"},{"line_number":5126,"context_line":"                resp \u003d req.get_response(self.app)"},{"line_number":5127,"context_line":"            self.assertEqual(resp.status_int, 202)"},{"line_number":5128,"context_line":"            temp_stats \u003d self.app.logger.statsd_client.get_increment_counts()"}],"source_content_type":"text/x-python","patch_set":7,"id":"ce8c8c8a_5213370a","line":5125,"in_reply_to":"11dd4bad_fd6db529","updated":"2025-03-17 05:17:53.000000000","message":"\u003e pep8: F841 local variable \u0027populator\u0027 is assigned to but never used\n\nPlease fix.","commit_id":"88bbf8f3faa0f9d7e535292076c815130adaef86"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"80ab358327419b84a3c381b5ff2ae2ab81827ac8","unresolved":false,"context_lines":[{"line_number":5122,"context_line":"                        \u0027swift.proxy.controllers.obj.BaseObjectController.\u0027"},{"line_number":5123,"context_line":"                        \u0027_get_backend_updating_namespaces\u0027,"},{"line_number":5124,"context_line":"                        delayed_do_fetch_backend(body, resp_headers))\\"},{"line_number":5125,"context_line":"                    as populator:"},{"line_number":5126,"context_line":"                resp \u003d req.get_response(self.app)"},{"line_number":5127,"context_line":"            self.assertEqual(resp.status_int, 202)"},{"line_number":5128,"context_line":"            temp_stats \u003d self.app.logger.statsd_client.get_increment_counts()"}],"source_content_type":"text/x-python","patch_set":7,"id":"dd0af303_453e497b","line":5125,"in_reply_to":"ce8c8c8a_5213370a","updated":"2025-03-21 16:27:27.000000000","message":"Done","commit_id":"88bbf8f3faa0f9d7e535292076c815130adaef86"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"259ce60ec25c2781fe2ca0d8b3e073d7af39a203","unresolved":true,"context_lines":[{"line_number":5132,"context_line":"            # \u0027container.info.cache.miss.200\u0027: 1,"},{"line_number":5133,"context_line":"            # \u0027container.info.infocache.hit\u0027: 1}"},{"line_number":5134,"context_line":""},{"line_number":5135,"context_line":"            for key in temp_stats:"},{"line_number":5136,"context_line":"                stats[key] \u003d stats[key] + temp_stats[key]"},{"line_number":5137,"context_line":""},{"line_number":5138,"context_line":"        # Issue those parallel requests \"at the same time\"."}],"source_content_type":"text/x-python","patch_set":7,"id":"6101ec61_62f70ab8","line":5135,"updated":"2025-03-17 05:17:53.000000000","message":"no need to calculate stats manually, use debug logger instead.","commit_id":"88bbf8f3faa0f9d7e535292076c815130adaef86"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"80ab358327419b84a3c381b5ff2ae2ab81827ac8","unresolved":false,"context_lines":[{"line_number":5132,"context_line":"            # \u0027container.info.cache.miss.200\u0027: 1,"},{"line_number":5133,"context_line":"            # \u0027container.info.infocache.hit\u0027: 1}"},{"line_number":5134,"context_line":""},{"line_number":5135,"context_line":"            for key in temp_stats:"},{"line_number":5136,"context_line":"                stats[key] \u003d stats[key] + temp_stats[key]"},{"line_number":5137,"context_line":""},{"line_number":5138,"context_line":"        # Issue those parallel requests \"at the same time\"."}],"source_content_type":"text/x-python","patch_set":7,"id":"d5a01559_93ea4e34","line":5135,"in_reply_to":"6101ec61_62f70ab8","updated":"2025-03-21 16:27:27.000000000","message":"Acknowledged","commit_id":"88bbf8f3faa0f9d7e535292076c815130adaef86"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"ef286776eaf2ef7d6ede2366aa387534a39097c6","unresolved":true,"context_lines":[{"line_number":5654,"context_line":"                resp \u003d req.get_response(self.app)"},{"line_number":5655,"context_line":"            self.assertEqual(resp.status_int, 202)"},{"line_number":5656,"context_line":""},{"line_number":5657,"context_line":"        pool \u003d eventlet.GreenPool()"},{"line_number":5658,"context_line":"        pool.spawn(worker, \u0027POST\u0027, \u0027/v1/a/c/o\u0027, (200, 200, 202, 202, 202))"},{"line_number":5659,"context_line":"        pool.spawn(worker, \u0027POST\u0027, \u0027/v1/a1/c1/o1\u0027, (200, 200, 202, 202, 202))"},{"line_number":5660,"context_line":"        # pool.spawn(worker, \u0027POST\u0027, \u0027/v1/a2/c2/o2\u0027, (200, 200, 202, 202, 202))"}],"source_content_type":"text/x-python","patch_set":10,"id":"f7a69e98_83ba375f","line":5657,"range":{"start_line":5657,"start_character":8,"end_line":5657,"end_character":12},"updated":"2025-03-21 16:40:42.000000000","message":"For the first two requests:\n{\u0027account.info.cache.miss.200\u0027: 2, \u0027account.info.infocache.hit\u0027: 2, \u0027container.info.cache.miss.202\u0027: 2, \u0027container.info.infocache.hit\u0027: 2, \u0027token.shard_updating.backend_reqs.with_token.200\u0027: 2, \u0027token.shard_updating.done_token_reqs\u0027: 2, \u0027object.shard_updating.cache.set\u0027: 2, \u0027object.shard_updating.cache.miss.200\u0027: 2}\n\nThree spawn:\n{\u0027account.info.cache.miss.200\u0027: 2, \u0027account.info.infocache.hit\u0027: 3, \u0027account.info.cache.miss.202\u0027: 1, \u0027container.info.cache.miss.202\u0027: 2, \u0027container.info.infocache.hit\u0027: 2, \u0027container.info.cache.miss.503\u0027: 1, \u0027token.shard_updating.backend_reqs.with_token.200\u0027: 2, \u0027token.shard_updating.done_token_reqs\u0027: 2, \u0027object.shard_updating.cache.set\u0027: 2, \u0027object.shard_updating.cache.miss.200\u0027: 2}\n\n\nproxy-ut INFO: Caching updating shards for shard-updating-v2/a/c (3 shards) with a finished token (txn: tx64b560c257c24f24ba0e2-0067dd8fbc)\nproxy-ut INFO: Caching updating shards for shard-updating-v2/a1/c1 (3 shards) with a finished token (txn: tx545fc9ba898c4f42aaacd-0067dd8fbc)\nWe get 3 shards but the requests are not completed successfully coz we get a 503. \n\nproxy-ut ERROR: Object POST returning 503 for (202, 503, 503) (txn: tx64b560c257c24f24ba0e2-0067dd8fbc)\nproxy-ut ERROR: Object POST returning 503 for (503, 503, 503) (txn: tx545fc9ba898c4f42aaacd-0067dd8fbc)\n\nbecause\nproxy-ut ERROR: ERROR with Object server 10.0.0.2:1002/sdc re: Trying to POST /a/c/o","commit_id":"8079106d66e4e4fe29d208b18efbb465455b48f7"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"b20f5ee1b60b9f89f9be029c954dd158936b3a16","unresolved":false,"context_lines":[{"line_number":5654,"context_line":"                resp \u003d req.get_response(self.app)"},{"line_number":5655,"context_line":"            self.assertEqual(resp.status_int, 202)"},{"line_number":5656,"context_line":""},{"line_number":5657,"context_line":"        pool \u003d eventlet.GreenPool()"},{"line_number":5658,"context_line":"        pool.spawn(worker, \u0027POST\u0027, \u0027/v1/a/c/o\u0027, (200, 200, 202, 202, 202))"},{"line_number":5659,"context_line":"        pool.spawn(worker, \u0027POST\u0027, \u0027/v1/a1/c1/o1\u0027, (200, 200, 202, 202, 202))"},{"line_number":5660,"context_line":"        # pool.spawn(worker, \u0027POST\u0027, \u0027/v1/a2/c2/o2\u0027, (200, 200, 202, 202, 202))"}],"source_content_type":"text/x-python","patch_set":10,"id":"18eb08dd_765e79e9","line":5657,"range":{"start_line":5657,"start_character":8,"end_line":5657,"end_character":12},"in_reply_to":"f7a69e98_83ba375f","updated":"2025-04-07 02:45:21.000000000","message":"this is due to that the mocked_http_conn is global and every green thread in this new test case will create a new mocked_http_conn, then all those requests ended up with sharing the status codes for one request.\n\nI fixed this by using mocked_http_conn only once and using 200 for the status codes.","commit_id":"8079106d66e4e4fe29d208b18efbb465455b48f7"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"d5cda6c25343c0d0e732b73ea69c4d7470595a58","unresolved":true,"context_lines":[{"line_number":5662,"context_line":"        stats \u003d self.app.logger.statsd_client.get_increment_counts()"},{"line_number":5663,"context_line":"        self.assertEqual("},{"line_number":5664,"context_line":"            {"},{"line_number":5665,"context_line":"                \"account.info.cache.miss.200\": 100,"},{"line_number":5666,"context_line":"                \"account.info.infocache.hit\": 100,"},{"line_number":5667,"context_line":"                \"container.info.cache.miss.200\": 100,"},{"line_number":5668,"context_line":"                \"container.info.infocache.hit\": 100,"}],"source_content_type":"text/x-python","patch_set":13,"id":"a6889d00_745e628f","line":5665,"updated":"2025-04-09 04:22:01.000000000","message":"use ``num_processes`` to replace ``100``","commit_id":"be331209e7a798e6d319ba02bb36e546d7191e50"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"81feef8fffbefabda888628f97362c5f80cfafc3","unresolved":false,"context_lines":[{"line_number":5662,"context_line":"        stats \u003d self.app.logger.statsd_client.get_increment_counts()"},{"line_number":5663,"context_line":"        self.assertEqual("},{"line_number":5664,"context_line":"            {"},{"line_number":5665,"context_line":"                \"account.info.cache.miss.200\": 100,"},{"line_number":5666,"context_line":"                \"account.info.infocache.hit\": 100,"},{"line_number":5667,"context_line":"                \"container.info.cache.miss.200\": 100,"},{"line_number":5668,"context_line":"                \"container.info.infocache.hit\": 100,"}],"source_content_type":"text/x-python","patch_set":13,"id":"b4ebc294_099e76d8","line":5665,"in_reply_to":"a6889d00_745e628f","updated":"2025-04-09 04:48:40.000000000","message":"Done","commit_id":"be331209e7a798e6d319ba02bb36e546d7191e50"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"d5cda6c25343c0d0e732b73ea69c4d7470595a58","unresolved":true,"context_lines":[{"line_number":5709,"context_line":"            if flag \u003e 0:"},{"line_number":5710,"context_line":"                resp \u003d Response(body\u003dbody, status\u003d200)"},{"line_number":5711,"context_line":"            else:"},{"line_number":5712,"context_line":"                resp \u003d Response(body\u003dbody, status\u003d503)"},{"line_number":5713,"context_line":"            flag +\u003d 1"},{"line_number":5714,"context_line":"            return NamespaceBoundList.parse(shard_ranges), resp"},{"line_number":5715,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"d77ba936_d76f20ba","line":5712,"updated":"2025-04-09 04:22:01.000000000","message":"set ``body`` as None","commit_id":"be331209e7a798e6d319ba02bb36e546d7191e50"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"81feef8fffbefabda888628f97362c5f80cfafc3","unresolved":false,"context_lines":[{"line_number":5709,"context_line":"            if flag \u003e 0:"},{"line_number":5710,"context_line":"                resp \u003d Response(body\u003dbody, status\u003d200)"},{"line_number":5711,"context_line":"            else:"},{"line_number":5712,"context_line":"                resp \u003d Response(body\u003dbody, status\u003d503)"},{"line_number":5713,"context_line":"            flag +\u003d 1"},{"line_number":5714,"context_line":"            return NamespaceBoundList.parse(shard_ranges), resp"},{"line_number":5715,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"8d69d36b_d66f8451","line":5712,"in_reply_to":"d77ba936_d76f20ba","updated":"2025-04-09 04:48:40.000000000","message":"Done","commit_id":"be331209e7a798e6d319ba02bb36e546d7191e50"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"d5cda6c25343c0d0e732b73ea69c4d7470595a58","unresolved":true,"context_lines":[{"line_number":5711,"context_line":"            else:"},{"line_number":5712,"context_line":"                resp \u003d Response(body\u003dbody, status\u003d503)"},{"line_number":5713,"context_line":"            flag +\u003d 1"},{"line_number":5714,"context_line":"            return NamespaceBoundList.parse(shard_ranges), resp"},{"line_number":5715,"context_line":""},{"line_number":5716,"context_line":"        def worker(method, unique_path):"},{"line_number":5717,"context_line":"            app \u003d proxy_server.Application("}],"source_content_type":"text/x-python","patch_set":13,"id":"dfc4c3ad_46ff082b","line":5714,"updated":"2025-04-09 04:22:01.000000000","message":"return ``None, resp`` for 503 response","commit_id":"be331209e7a798e6d319ba02bb36e546d7191e50"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"81feef8fffbefabda888628f97362c5f80cfafc3","unresolved":false,"context_lines":[{"line_number":5711,"context_line":"            else:"},{"line_number":5712,"context_line":"                resp \u003d Response(body\u003dbody, status\u003d503)"},{"line_number":5713,"context_line":"            flag +\u003d 1"},{"line_number":5714,"context_line":"            return NamespaceBoundList.parse(shard_ranges), resp"},{"line_number":5715,"context_line":""},{"line_number":5716,"context_line":"        def worker(method, unique_path):"},{"line_number":5717,"context_line":"            app \u003d proxy_server.Application("}],"source_content_type":"text/x-python","patch_set":13,"id":"404a5eb1_e3d9b04a","line":5714,"in_reply_to":"dfc4c3ad_46ff082b","updated":"2025-04-09 04:48:40.000000000","message":"Done","commit_id":"be331209e7a798e6d319ba02bb36e546d7191e50"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"d5cda6c25343c0d0e732b73ea69c4d7470595a58","unresolved":true,"context_lines":[{"line_number":5750,"context_line":"        stats \u003d self.app.logger.statsd_client.get_increment_counts()"},{"line_number":5751,"context_line":"        self.assertEqual("},{"line_number":5752,"context_line":"            {"},{"line_number":5753,"context_line":"                \u0027account.info.cache.miss.200\u0027: 100,"},{"line_number":5754,"context_line":"                \u0027account.info.infocache.hit\u0027: 100,"},{"line_number":5755,"context_line":"                \u0027container.info.cache.miss.200\u0027: 100,"},{"line_number":5756,"context_line":"                \u0027container.info.infocache.hit\u0027: 100,"}],"source_content_type":"text/x-python","patch_set":13,"id":"6b9ad8eb_aae8134b","line":5753,"updated":"2025-04-09 04:22:01.000000000","message":"ditto","commit_id":"be331209e7a798e6d319ba02bb36e546d7191e50"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"81feef8fffbefabda888628f97362c5f80cfafc3","unresolved":false,"context_lines":[{"line_number":5750,"context_line":"        stats \u003d self.app.logger.statsd_client.get_increment_counts()"},{"line_number":5751,"context_line":"        self.assertEqual("},{"line_number":5752,"context_line":"            {"},{"line_number":5753,"context_line":"                \u0027account.info.cache.miss.200\u0027: 100,"},{"line_number":5754,"context_line":"                \u0027account.info.infocache.hit\u0027: 100,"},{"line_number":5755,"context_line":"                \u0027container.info.cache.miss.200\u0027: 100,"},{"line_number":5756,"context_line":"                \u0027container.info.infocache.hit\u0027: 100,"}],"source_content_type":"text/x-python","patch_set":13,"id":"e62cb461_46490899","line":5753,"in_reply_to":"6b9ad8eb_aae8134b","updated":"2025-04-09 04:48:40.000000000","message":"Done","commit_id":"be331209e7a798e6d319ba02bb36e546d7191e50"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"205c3dba4da78d2a40bf6ae359ddcd7b00172abc","unresolved":true,"context_lines":[{"line_number":5755,"context_line":"                \u0027container.info.cache.miss.200\u0027: 100,"},{"line_number":5756,"context_line":"                \u0027container.info.infocache.hit\u0027: 100,"},{"line_number":5757,"context_line":"                \u0027token.shard_updating.backend_reqs.with_token.503\u0027: 1,"},{"line_number":5758,"context_line":"                \u0027token.shard_updating.done_token_reqs\u0027: 3,"},{"line_number":5759,"context_line":"                \u0027object.shard_updating.cache.set\u0027: 3,"},{"line_number":5760,"context_line":"                \u0027object.shard_updating.cache.miss.503\u0027: 1,"},{"line_number":5761,"context_line":"                \u0027token.shard_updating.cache_served_reqs\u0027: 97,"}],"source_content_type":"text/x-python","patch_set":13,"id":"4a35ce2c_b326c9e7","line":5758,"updated":"2025-04-09 04:34:40.000000000","message":"this is not right, they should be\n```\n                \u0027token.shard_updating.done_token_reqs\u0027: 2,\n                \u0027object.shard_updating.cache.set\u0027: 2,\n```","commit_id":"be331209e7a798e6d319ba02bb36e546d7191e50"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"81feef8fffbefabda888628f97362c5f80cfafc3","unresolved":false,"context_lines":[{"line_number":5755,"context_line":"                \u0027container.info.cache.miss.200\u0027: 100,"},{"line_number":5756,"context_line":"                \u0027container.info.infocache.hit\u0027: 100,"},{"line_number":5757,"context_line":"                \u0027token.shard_updating.backend_reqs.with_token.503\u0027: 1,"},{"line_number":5758,"context_line":"                \u0027token.shard_updating.done_token_reqs\u0027: 3,"},{"line_number":5759,"context_line":"                \u0027object.shard_updating.cache.set\u0027: 3,"},{"line_number":5760,"context_line":"                \u0027object.shard_updating.cache.miss.503\u0027: 1,"},{"line_number":5761,"context_line":"                \u0027token.shard_updating.cache_served_reqs\u0027: 97,"}],"source_content_type":"text/x-python","patch_set":13,"id":"f65908e2_c49f7c7e","line":5758,"in_reply_to":"4a35ce2c_b326c9e7","updated":"2025-04-09 04:48:40.000000000","message":"Done","commit_id":"be331209e7a798e6d319ba02bb36e546d7191e50"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"18605a1503fdc870080fef230d074492a7ed82ec","unresolved":true,"context_lines":[{"line_number":5791,"context_line":"                \u0027object.shard_updating.cache.miss\u0027: num_processes - 3,"},{"line_number":5792,"context_line":"                \"object.shard_updating.cache.miss.200\": 3,"},{"line_number":5793,"context_line":"                \"object.shard_updating.cache.set\": 3,"},{"line_number":5794,"context_line":"                \"token.shard_updating.backend_reqs.with_token.200\": 3,"},{"line_number":5795,"context_line":"                \"token.shard_updating.done_token_reqs\": 3,"},{"line_number":5796,"context_line":"                \"token.shard_updating.cache_served_reqs\": num_processes - 3,"},{"line_number":5797,"context_line":"            },"}],"source_content_type":"text/x-python","patch_set":22,"id":"6133dcdb_4960863c","line":5794,"updated":"2025-08-22 22:11:20.000000000","message":"@shreeyad@nvidia.com this test failed because we have migrate those three statsd metrics to label metrics\n```\n      \"token.shard_updating.backend_reqs.with_token.200\": 3,\n      \"token.shard_updating.done_token_reqs\": 3,\n      \"token.shard_updating.cache_served_reqs\": num_processes - 3,\n```\n\nplease refer to this example on what label metrics they have became:\nhttps://review.opendev.org/c/openstack/swift/+/890174/56/test/unit/common/test_utils.py#3676","commit_id":"526b65a41fcc36faaa8b3ec1d1583fc0058121f3"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"aca96b09e27d401f6e9641d4ec915b5a70250e4e","unresolved":false,"context_lines":[{"line_number":5791,"context_line":"                \u0027object.shard_updating.cache.miss\u0027: num_processes - 3,"},{"line_number":5792,"context_line":"                \"object.shard_updating.cache.miss.200\": 3,"},{"line_number":5793,"context_line":"                \"object.shard_updating.cache.set\": 3,"},{"line_number":5794,"context_line":"                \"token.shard_updating.backend_reqs.with_token.200\": 3,"},{"line_number":5795,"context_line":"                \"token.shard_updating.done_token_reqs\": 3,"},{"line_number":5796,"context_line":"                \"token.shard_updating.cache_served_reqs\": num_processes - 3,"},{"line_number":5797,"context_line":"            },"}],"source_content_type":"text/x-python","patch_set":22,"id":"847da659_b2f30ce6","line":5794,"in_reply_to":"6133dcdb_4960863c","updated":"2025-08-26 23:31:20.000000000","message":"Acknowledged","commit_id":"526b65a41fcc36faaa8b3ec1d1583fc0058121f3"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"18605a1503fdc870080fef230d074492a7ed82ec","unresolved":true,"context_lines":[{"line_number":5881,"context_line":"            \u0027object.shard_updating.cache.set\u0027: 3 - failures,"},{"line_number":5882,"context_line":"            \u0027object.shard_updating.cache.miss.503\u0027: failures,"},{"line_number":5883,"context_line":"            \u0027token.shard_updating.cache_served_reqs\u0027: num_processes - 3,"},{"line_number":5884,"context_line":"            \u0027object.shard_updating.cache.miss\u0027: num_processes - 3,"},{"line_number":5885,"context_line":"            \u0027token.shard_updating.backend_reqs.with_token.200\u0027: 3 - failures,"},{"line_number":5886,"context_line":"            \u0027object.shard_updating.cache.miss.200\u0027: 3 - failures,"},{"line_number":5887,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":22,"id":"549c51e8_0f20f390","line":5884,"updated":"2025-08-22 22:11:20.000000000","message":"ditto","commit_id":"526b65a41fcc36faaa8b3ec1d1583fc0058121f3"},{"author":{"_account_id":35790,"name":"Shreeya Deshpande","email":"shreeyad@nvidia.com","username":"shreeyad"},"change_message_id":"aca96b09e27d401f6e9641d4ec915b5a70250e4e","unresolved":false,"context_lines":[{"line_number":5881,"context_line":"            \u0027object.shard_updating.cache.set\u0027: 3 - failures,"},{"line_number":5882,"context_line":"            \u0027object.shard_updating.cache.miss.503\u0027: failures,"},{"line_number":5883,"context_line":"            \u0027token.shard_updating.cache_served_reqs\u0027: num_processes - 3,"},{"line_number":5884,"context_line":"            \u0027object.shard_updating.cache.miss\u0027: num_processes - 3,"},{"line_number":5885,"context_line":"            \u0027token.shard_updating.backend_reqs.with_token.200\u0027: 3 - failures,"},{"line_number":5886,"context_line":"            \u0027object.shard_updating.cache.miss.200\u0027: 3 - failures,"},{"line_number":5887,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":22,"id":"bf7bc5e8_0a26da9d","line":5884,"in_reply_to":"549c51e8_0f20f390","updated":"2025-08-26 23:31:20.000000000","message":"Acknowledged","commit_id":"526b65a41fcc36faaa8b3ec1d1583fc0058121f3"}]}
