)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"aafab5664ab60d605619f94248d65d6667da4428","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"2f7fb76a_b1ca4868","updated":"2023-05-19 08:39:00.000000000","message":"I\u0027m a little wary of adding too much logging (we already have metrics), but these events are only expected once per sharded container per 10 or 60 minutes (recheck_[listing|updating]_shard_ranges), so should be ok.\n\nThis will give us useful insight in prod, let\u0027s carry it and get some confidence in the log rate before merging.","commit_id":"23f24bdffd8875aa3cba7b4dccca1e3b1298d03d"}],"swift/proxy/controllers/container.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"705824b7911118ee88c50a62f215b7981a6b9b4a","unresolved":true,"context_lines":[{"line_number":240,"context_line":"            if memcache and ns_bound_list:"},{"line_number":241,"context_line":"                # cache in memcache only if shard ranges as expected"},{"line_number":242,"context_line":"                self.logger.info(\u0027Caching %d listing shards for %s\u0027,"},{"line_number":243,"context_line":"                                 len(ns_bound_list.bounds), cache_key)"},{"line_number":244,"context_line":"                memcache.set(cache_key, ns_bound_list.bounds,"},{"line_number":245,"context_line":"                             time\u003dself.app.recheck_listing_shard_ranges)"},{"line_number":246,"context_line":"        return ns_bound_list"}],"source_content_type":"text/x-python","patch_set":2,"id":"073a05e5_1b201512","line":243,"updated":"2023-06-13 09:11:24.000000000","message":"having now searched logs for these events, I think I\u0027d prefer the \"event\" string (\"Caching listing shards\") to be unpolluted by a variable. i.e.\"\n\n```\nCaching listing shards for shard-listing-v2/AUTH_su_ngcbatch_ceph_backup/nvidian-257-datasets-1607254 (19 shards)```\n\nso I can easily search for every occurrence of \"Caching listing shards\"","commit_id":"725bb2d1eb5bbae62c25c073912edd69ab95731a"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"4e097ea8d1cb2b54c212add47bc50e5ccf636a66","unresolved":false,"context_lines":[{"line_number":240,"context_line":"            if memcache and ns_bound_list:"},{"line_number":241,"context_line":"                # cache in memcache only if shard ranges as expected"},{"line_number":242,"context_line":"                self.logger.info(\u0027Caching %d listing shards for %s\u0027,"},{"line_number":243,"context_line":"                                 len(ns_bound_list.bounds), cache_key)"},{"line_number":244,"context_line":"                memcache.set(cache_key, ns_bound_list.bounds,"},{"line_number":245,"context_line":"                             time\u003dself.app.recheck_listing_shard_ranges)"},{"line_number":246,"context_line":"        return ns_bound_list"}],"source_content_type":"text/x-python","patch_set":2,"id":"b879346d_48be6c5a","line":243,"in_reply_to":"073a05e5_1b201512","updated":"2023-06-13 18:21:27.000000000","message":"Done","commit_id":"725bb2d1eb5bbae62c25c073912edd69ab95731a"}],"swift/proxy/controllers/obj.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"aafab5664ab60d605619f94248d65d6667da4428","unresolved":true,"context_lines":[{"line_number":388,"context_line":"                    self.logger.info("},{"line_number":389,"context_line":"                        \u0027Caching %d updating shards for %s\u0027,"},{"line_number":390,"context_line":"                        len(cached_namespaces.bounds),"},{"line_number":391,"context_line":"                        cache_key)"},{"line_number":392,"context_line":"                    memcache.set("},{"line_number":393,"context_line":"                        cache_key, cached_namespaces.bounds,"},{"line_number":394,"context_line":"                        time\u003dself.app.recheck_updating_shard_ranges)"}],"source_content_type":"text/x-python","patch_set":1,"id":"e553949a_b2b3ec19","line":391,"updated":"2023-05-19 08:39:00.000000000","message":"nit: looks like cache_key doesn\u0027t need to be on a new line","commit_id":"23f24bdffd8875aa3cba7b4dccca1e3b1298d03d"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"f677030efa34f1f51bf6389940ecc974b905e502","unresolved":false,"context_lines":[{"line_number":388,"context_line":"                    self.logger.info("},{"line_number":389,"context_line":"                        \u0027Caching %d updating shards for %s\u0027,"},{"line_number":390,"context_line":"                        len(cached_namespaces.bounds),"},{"line_number":391,"context_line":"                        cache_key)"},{"line_number":392,"context_line":"                    memcache.set("},{"line_number":393,"context_line":"                        cache_key, cached_namespaces.bounds,"},{"line_number":394,"context_line":"                        time\u003dself.app.recheck_updating_shard_ranges)"}],"source_content_type":"text/x-python","patch_set":1,"id":"4caf15d9_b17aff57","line":391,"in_reply_to":"e553949a_b2b3ec19","updated":"2023-06-13 04:59:57.000000000","message":"Done","commit_id":"23f24bdffd8875aa3cba7b4dccca1e3b1298d03d"}],"test/unit/proxy/controllers/test_container.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"aafab5664ab60d605619f94248d65d6667da4428","unresolved":true,"context_lines":[{"line_number":3213,"context_line":"        info_lines \u003d self.logger.get_lines_for_level(\u0027info\u0027)"},{"line_number":3214,"context_line":"        self.assertIn("},{"line_number":3215,"context_line":"            \u0027Caching 3 listing shards for shard-listing-v2/a/c\u0027,"},{"line_number":3216,"context_line":"            info_lines[0])"},{"line_number":3217,"context_line":"        # shards were cached"},{"line_number":3218,"context_line":"        self.assertEqual(\u0027sharded\u0027,"},{"line_number":3219,"context_line":"                         self.memcache.calls[2][1][1][\u0027sharding_state\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"f21ce067_9b7c89a0","line":3216,"updated":"2023-05-19 08:39:00.000000000","message":"I think this assertion would be true for info_lines (with no index) - which would make the test less brittle if we ever added another info log\n\n(I didn\u0027t make that change to check though)","commit_id":"23f24bdffd8875aa3cba7b4dccca1e3b1298d03d"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"f677030efa34f1f51bf6389940ecc974b905e502","unresolved":false,"context_lines":[{"line_number":3213,"context_line":"        info_lines \u003d self.logger.get_lines_for_level(\u0027info\u0027)"},{"line_number":3214,"context_line":"        self.assertIn("},{"line_number":3215,"context_line":"            \u0027Caching 3 listing shards for shard-listing-v2/a/c\u0027,"},{"line_number":3216,"context_line":"            info_lines[0])"},{"line_number":3217,"context_line":"        # shards were cached"},{"line_number":3218,"context_line":"        self.assertEqual(\u0027sharded\u0027,"},{"line_number":3219,"context_line":"                         self.memcache.calls[2][1][1][\u0027sharding_state\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"8cfa7011_598b7387","line":3216,"in_reply_to":"f21ce067_9b7c89a0","updated":"2023-06-13 04:59:57.000000000","message":"Done","commit_id":"23f24bdffd8875aa3cba7b4dccca1e3b1298d03d"}],"test/unit/proxy/test_server.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"aafab5664ab60d605619f94248d65d6667da4428","unresolved":true,"context_lines":[{"line_number":4359,"context_line":"            info_lines \u003d self.logger.get_lines_for_level(\u0027info\u0027)"},{"line_number":4360,"context_line":"            self.assertIn("},{"line_number":4361,"context_line":"                \u0027Caching 3 updating shards for shard-updating-v2/a/c\u0027,"},{"line_number":4362,"context_line":"                info_lines[0])"},{"line_number":4363,"context_line":""},{"line_number":4364,"context_line":"            backend_requests \u003d fake_conn.requests"},{"line_number":4365,"context_line":"            account_request \u003d backend_requests[0]"}],"source_content_type":"text/x-python","patch_set":1,"id":"2e2ee6af_487f2933","line":4362,"updated":"2023-05-19 08:39:00.000000000","message":"ditto: use just info_lines and the test is less brittle to adding other info logs","commit_id":"23f24bdffd8875aa3cba7b4dccca1e3b1298d03d"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"f677030efa34f1f51bf6389940ecc974b905e502","unresolved":false,"context_lines":[{"line_number":4359,"context_line":"            info_lines \u003d self.logger.get_lines_for_level(\u0027info\u0027)"},{"line_number":4360,"context_line":"            self.assertIn("},{"line_number":4361,"context_line":"                \u0027Caching 3 updating shards for shard-updating-v2/a/c\u0027,"},{"line_number":4362,"context_line":"                info_lines[0])"},{"line_number":4363,"context_line":""},{"line_number":4364,"context_line":"            backend_requests \u003d fake_conn.requests"},{"line_number":4365,"context_line":"            account_request \u003d backend_requests[0]"}],"source_content_type":"text/x-python","patch_set":1,"id":"b7493897_f8de9cb9","line":4362,"in_reply_to":"2e2ee6af_487f2933","updated":"2023-06-13 04:59:57.000000000","message":"Done","commit_id":"23f24bdffd8875aa3cba7b4dccca1e3b1298d03d"}]}
