)]}'
{"swift/proxy/controllers/base.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"a228d90c19ce2e96acb55ee271c8aa165f074143","unresolved":false,"context_lines":[{"line_number":555,"context_line":"    if resp:"},{"line_number":556,"context_line":"        if resp.status_int in (HTTP_NOT_FOUND, HTTP_GONE):"},{"line_number":557,"context_line":"            cache_time *\u003d 0.1"},{"line_number":558,"context_line":"        elif not is_success(resp.status_int):"},{"line_number":559,"context_line":"            cache_time \u003d None"},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"    # Next actually set both memcache and the env cache"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_1cf21c9b","line":558,"updated":"2020-06-12 15:47:43.000000000","message":"if resp and not is_success\n\nmaybe we shouldn\u0027t be setting cache_time to None here?","commit_id":"3ecbf8c7608ccb3e3bf7bf29b6351bb684aa1c15"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"a228d90c19ce2e96acb55ee271c8aa165f074143","unresolved":false,"context_lines":[{"line_number":563,"context_line":"    if cache_time is None:"},{"line_number":564,"context_line":"        infocache.pop(cache_key, None)"},{"line_number":565,"context_line":"        if memcache and not (resp and is_server_error(resp.status_int)):"},{"line_number":566,"context_line":"            memcache.delete(cache_key)"},{"line_number":567,"context_line":"        return"},{"line_number":568,"context_line":""},{"line_number":569,"context_line":"    if container:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_5c2934f0","line":566,"updated":"2020-06-12 15:47:43.000000000","message":"maybe we shouldn\u0027t equivocate cache_time None with clear infocache and pop memcache?","commit_id":"3ecbf8c7608ccb3e3bf7bf29b6351bb684aa1c15"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f9623be1f61883e9aec4efbc42093cfd545a34f5","unresolved":false,"context_lines":[{"line_number":541,"context_line":"    \"\"\""},{"line_number":542,"context_line":"    infocache \u003d env.setdefault(\u0027swift.infocache\u0027, {})"},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"    cache_time \u003d None"},{"line_number":545,"context_line":"    if container and resp:"},{"line_number":546,"context_line":"        cache_time \u003d int(resp.headers.get("},{"line_number":547,"context_line":"            \u0027X-Backend-Recheck-Container-Existence\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf51134e_98f5f586","side":"PARENT","line":544,"range":{"start_line":544,"start_character":4,"end_line":544,"end_character":21},"updated":"2020-06-13 00:34:42.000000000","message":"Yeah, conflating\n\n cache_time is None \u003d\u003e resp is None\n\nand\n\n cache_time is None \u003d\u003e don\u0027t cache\n\nwas a bad idea from the get-go I think.","commit_id":"0bed59e3faae94b96f98bbbc61b09abe54453267"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f9623be1f61883e9aec4efbc42093cfd545a34f5","unresolved":false,"context_lines":[{"line_number":534,"context_line":"    :param  app: the application object"},{"line_number":535,"context_line":"    :param  account: the unquoted account name"},{"line_number":536,"context_line":"    :param  container: the unquoted container name or None"},{"line_number":537,"context_line":"    :param  resp: the response received or None if info cache should be cleared"},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"    :returns: the info that was placed into the cache, or None if the"},{"line_number":540,"context_line":"              request status was not in (404, 410, 2xx)."}],"source_content_type":"text/x-python","patch_set":2,"id":"bf51134e_180a8589","line":537,"range":{"start_line":537,"start_character":40,"end_line":537,"end_character":79},"updated":"2020-06-13 00:34:42.000000000","message":"Going by the docstring, it sure *seems like* this is the only case where we ought to be killing cache.","commit_id":"e0839f47b81ffbe27c2ee68618a1d2c6b2b0d2ac"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f9623be1f61883e9aec4efbc42093cfd545a34f5","unresolved":false,"context_lines":[{"line_number":545,"context_line":""},{"line_number":546,"context_line":"    if resp is None:"},{"line_number":547,"context_line":"        infocache.pop(cache_key, None)"},{"line_number":548,"context_line":"        if memcache and not (resp and is_server_error(resp.status_int)):"},{"line_number":549,"context_line":"            memcache.delete(cache_key)"},{"line_number":550,"context_line":"        return"},{"line_number":551,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"bf51134e_b8f8b97c","line":548,"range":{"start_line":548,"start_character":20,"end_line":548,"end_character":71},"updated":"2020-06-13 00:34:42.000000000","message":"Bah -- forgot to clean this up. resp is None, so this can all go.","commit_id":"e0839f47b81ffbe27c2ee68618a1d2c6b2b0d2ac"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c0444085f3ac00f07ea1e72e0cd941ce0cb9acf5","unresolved":false,"context_lines":[{"line_number":537,"context_line":"    :param  resp: the response received or None if info cache should be cleared"},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"    :returns: the info that was placed into the cache, or None if the"},{"line_number":540,"context_line":"              request status was not in (404, 410, 2xx)."},{"line_number":541,"context_line":"    \"\"\""},{"line_number":542,"context_line":"    cache_key \u003d get_cache_key(account, container)"},{"line_number":543,"context_line":"    infocache \u003d env.setdefault(\u0027swift.infocache\u0027, {})"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf51134e_f346c021","line":540,"updated":"2020-06-15 17:10:58.000000000","message":"callers are certainly robust to returning None","commit_id":"b549a59aef79fa1fb9abe5fe138c92532c5d3314"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c0444085f3ac00f07ea1e72e0cd941ce0cb9acf5","unresolved":false,"context_lines":[{"line_number":543,"context_line":"    infocache \u003d env.setdefault(\u0027swift.infocache\u0027, {})"},{"line_number":544,"context_line":"    memcache \u003d getattr(app, \u0027memcache\u0027, None) or env.get(\u0027swift.cache\u0027)"},{"line_number":545,"context_line":""},{"line_number":546,"context_line":"    if resp is None:"},{"line_number":547,"context_line":"        infocache.pop(cache_key, None)"},{"line_number":548,"context_line":"        if memcache:"},{"line_number":549,"context_line":"            memcache.delete(cache_key)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf51134e_9375c49b","line":546,"updated":"2020-06-15 17:10:58.000000000","message":"this seems mainly so set_info_cache can be used by clear_info_cache","commit_id":"b549a59aef79fa1fb9abe5fe138c92532c5d3314"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"851357b02f470c3ccb94d52ee730541a43702611","unresolved":false,"context_lines":[{"line_number":543,"context_line":"    infocache \u003d env.setdefault(\u0027swift.infocache\u0027, {})"},{"line_number":544,"context_line":"    memcache \u003d getattr(app, \u0027memcache\u0027, None) or env.get(\u0027swift.cache\u0027)"},{"line_number":545,"context_line":""},{"line_number":546,"context_line":"    if resp is None:"},{"line_number":547,"context_line":"        infocache.pop(cache_key, None)"},{"line_number":548,"context_line":"        if memcache:"},{"line_number":549,"context_line":"            memcache.delete(cache_key)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf51134e_de1d8310","line":546,"in_reply_to":"bf51134e_9375c49b","updated":"2020-06-15 18:19:20.000000000","message":"Yeah, I don\u0027t understand why we felt that to be necessary back in https://review.opendev.org/#/c/30481/","commit_id":"b549a59aef79fa1fb9abe5fe138c92532c5d3314"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c0444085f3ac00f07ea1e72e0cd941ce0cb9acf5","unresolved":false,"context_lines":[{"line_number":563,"context_line":"    elif not is_success(resp.status_int):"},{"line_number":564,"context_line":"        # If we got a response, it was unsuccessful, and it wasn\u0027t an"},{"line_number":565,"context_line":"        # \"authoritative\" failure, bail without touching caches."},{"line_number":566,"context_line":"        return"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"    if container:"},{"line_number":569,"context_line":"        info \u003d headers_to_container_info(resp.headers, resp.status_int)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf51134e_7332b0a9","line":566,"updated":"2020-06-15 17:10:58.000000000","message":"so far, i can\u0027t think of a reasonable story for clearing the cache on 5XX or any other non \"authoritative\" response being helpful.\n\nI can imagine the race under load where a recently cached 200 response would get unintentionally evicted.","commit_id":"b549a59aef79fa1fb9abe5fe138c92532c5d3314"}],"test/probe/test_container_failures.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c0444085f3ac00f07ea1e72e0cd941ce0cb9acf5","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        self.assertEqual(caught.exception.http_status, 503)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        # But we can still write objects! The old info is still in memcache"},{"line_number":145,"context_line":"        client.put_object(self.url, self.token, container1, \u0027obj2\u0027, \u0027data2\u0027)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def _get_container_db_files(self, container):"},{"line_number":148,"context_line":"        opart, onodes \u003d self.container_ring.get_nodes(self.account, container)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf51134e_33edd8ef","line":145,"updated":"2020-06-15 17:10:58.000000000","message":"yikes, i guess \"no news is good news\" is reasonable?  the cache won\u0027t last forever, container put/post/delete will should try and clear it - and the existence check will fire again eventually so this can\u0027t go on like this too long if it\u0027s wrong","commit_id":"b549a59aef79fa1fb9abe5fe138c92532c5d3314"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"851357b02f470c3ccb94d52ee730541a43702611","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        self.assertEqual(caught.exception.http_status, 503)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        # But we can still write objects! The old info is still in memcache"},{"line_number":145,"context_line":"        client.put_object(self.url, self.token, container1, \u0027obj2\u0027, \u0027data2\u0027)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def _get_container_db_files(self, container):"},{"line_number":148,"context_line":"        opart, onodes \u003d self.container_ring.get_nodes(self.account, container)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf51134e_3e1bdf1b","line":145,"in_reply_to":"bf51134e_33edd8ef","updated":"2020-06-15 18:19:20.000000000","message":"Writes definitely *will* try to clear it -- will add a POST to the test to demonstrate.","commit_id":"b549a59aef79fa1fb9abe5fe138c92532c5d3314"}],"test/unit/proxy/controllers/test_account.py":[{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"7cbaef5b9358d71cb94947d1c3fd6ea14be83d22","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        self.assertEqual(header_info, info_cache[\u0027account/AUTH_bob\u0027])"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        with mock.patch(\u0027swift.proxy.controllers.base.http_connect\u0027,"},{"line_number":78,"context_line":"                        fake_http_connect(500, body\u003d\u0027\u0027)):"},{"line_number":79,"context_line":"            req \u003d Request.blank(\u0027/v1/AUTH_bob\u0027, {"},{"line_number":80,"context_line":"                \u0027PATH_INFO\u0027: \u0027/v1/AUTH_bob\u0027, \u0027swift.infocache\u0027: info_cache})"},{"line_number":81,"context_line":"            resp \u003d controller.HEAD(req)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf51134e_16667052","line":78,"updated":"2020-06-18 23:51:02.000000000","message":"not a binary body here? I\u0027m surprised nothing crashed.","commit_id":"7be7cc966b5a98a35cbbccfc426a4efb65583c12"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"4dd5e3cb51728a1b4df833766faf2b89be88f058","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        self.assertEqual(header_info, info_cache[\u0027account/AUTH_bob\u0027])"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        with mock.patch(\u0027swift.proxy.controllers.base.http_connect\u0027,"},{"line_number":78,"context_line":"                        fake_http_connect(500, body\u003d\u0027\u0027)):"},{"line_number":79,"context_line":"            req \u003d Request.blank(\u0027/v1/AUTH_bob\u0027, {"},{"line_number":80,"context_line":"                \u0027PATH_INFO\u0027: \u0027/v1/AUTH_bob\u0027, \u0027swift.infocache\u0027: info_cache})"},{"line_number":81,"context_line":"            resp \u003d controller.HEAD(req)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf51134e_31857e5b","line":78,"in_reply_to":"bf51134e_16667052","updated":"2020-06-19 00:19:00.000000000","message":"Maybe because it should have a `Content-Length: 0` header? *shrug*","commit_id":"7be7cc966b5a98a35cbbccfc426a4efb65583c12"}]}
