)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"daa332f215b04a1dbc1da4f6310a8626e4dff2e8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"2a78a60b_3c93a552","updated":"2023-09-28 14:35:07.000000000","message":"I\u0027m going to steal this and change it some","commit_id":"7d47bba6b21e598abfd8921890499a8513777070"}],"swift/common/middleware/slo.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"daa332f215b04a1dbc1da4f6310a8626e4dff2e8","unresolved":true,"context_lines":[{"line_number":823,"context_line":"            # If and only if we actually got back the full manifest body, then"},{"line_number":824,"context_line":"            # we can avoid re-fetching the object."},{"line_number":825,"context_line":"            got_everything \u003d (first_byte \u003d\u003d 0 and last_byte \u003d\u003d length - 1)"},{"line_number":826,"context_line":"            return not got_everything"},{"line_number":827,"context_line":""},{"line_number":828,"context_line":"        return False"},{"line_number":829,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"e1ade17d_8040778d","side":"PARENT","line":826,"updated":"2023-09-28 14:35:07.000000000","message":"i actually liked the got_everything variable name here, but i guess since we \"reversed\" this logic it\u0027s better to just have \"is_complete\" return \"first \u003d 0 and last \u003d end\"","commit_id":"2b14d606c7537f7a49d20c11caabf7b0a0afff3e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"daa332f215b04a1dbc1da4f6310a8626e4dff2e8","unresolved":true,"context_lines":[{"line_number":781,"context_line":"            last_byte -\u003d seg_length"},{"line_number":782,"context_line":""},{"line_number":783,"context_line":"    def _is_body_complete(self):"},{"line_number":784,"context_line":"        # new-style manifest metadata allows object server to ignore range"},{"line_number":785,"context_line":"        is_range_response \u003d self._response_status_int in (206, 416)"},{"line_number":786,"context_line":"        if is_range_response:"},{"line_number":787,"context_line":"            content_range \u003d \u0027\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"b3c82dda_91cad597","line":784,"updated":"2023-09-28 14:35:07.000000000","message":"this comment is wrong, it\u0027s not new metadata (2016) it\u0027s new swift (2019) that allows the range to be ignored https://review.opendev.org/c/openstack/swift/+/697739","commit_id":"7d47bba6b21e598abfd8921890499a8513777070"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"daa332f215b04a1dbc1da4f6310a8626e4dff2e8","unresolved":true,"context_lines":[{"line_number":798,"context_line":"            # If and only if we actually got back the full manifest body, then"},{"line_number":799,"context_line":"            # we can avoid re-fetching the object."},{"line_number":800,"context_line":"            return first_byte \u003d\u003d 0 and last_byte \u003d\u003d length - 1"},{"line_number":801,"context_line":"        return True"},{"line_number":802,"context_line":""},{"line_number":803,"context_line":"    def _need_to_refetch_manifest(self, req, slo_attrs, is_manifest_get):"},{"line_number":804,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"0dbc2946_440f5617","line":801,"updated":"2023-09-28 14:35:07.000000000","message":"I think I\u0027d prefer and explicit else\n\n```\nif not is_range:\n   # common case\n   return True\nelse:\n   # legacy swift support\n   return maybe True or False\n```","commit_id":"7d47bba6b21e598abfd8921890499a8513777070"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"daa332f215b04a1dbc1da4f6310a8626e4dff2e8","unresolved":true,"context_lines":[{"line_number":806,"context_line":"        complete manifest has been fetched."},{"line_number":807,"context_line":""},{"line_number":808,"context_line":"        Returns a tuple of booleans ``(manifest_needed, manifest_complete)``."},{"line_number":809,"context_line":"        ``manifest_complete`` is only valid if ``manifest_needed`` is ``True``."},{"line_number":810,"context_line":"        \"\"\""},{"line_number":811,"context_line":"        if not slo_attrs.is_slo:"},{"line_number":812,"context_line":"            # Not a static large object manifest, don\u0027t refetch"}],"source_content_type":"text/x-python","patch_set":1,"id":"1fe6b0d1_d361f3ff","line":809,"updated":"2023-09-28 14:35:07.000000000","message":"I don\u0027t love me a tuple return, but I do think this gets to the crux of it.","commit_id":"7d47bba6b21e598abfd8921890499a8513777070"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"daa332f215b04a1dbc1da4f6310a8626e4dff2e8","unresolved":true,"context_lines":[{"line_number":817,"context_line":"        # we may need to make a second request to actually get the whole thing."},{"line_number":818,"context_line":""},{"line_number":819,"context_line":"        if is_manifest_get:"},{"line_number":820,"context_line":"            return False, False"},{"line_number":821,"context_line":""},{"line_number":822,"context_line":"        if req.method \u003d\u003d \u0027HEAD\u0027:"},{"line_number":823,"context_line":"            # There may be some cases in the future where a HEAD resp on even a"}],"source_content_type":"text/x-python","patch_set":1,"id":"97605ecf_f6363686","line":820,"updated":"2023-09-28 14:35:07.000000000","message":"I think the rv[1] \u003d\u003d False here is questionable, it\u0027s just not relevant\n\nI guess rv[1] is ONLY relevant if rv[0] is True","commit_id":"7d47bba6b21e598abfd8921890499a8513777070"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"daa332f215b04a1dbc1da4f6310a8626e4dff2e8","unresolved":true,"context_lines":[{"line_number":833,"context_line":"        if is_conditional and slo_attrs.is_legacy:"},{"line_number":834,"context_line":"            return True, False"},{"line_number":835,"context_line":""},{"line_number":836,"context_line":"        return True, self._is_body_complete()"},{"line_number":837,"context_line":""},{"line_number":838,"context_line":"    def _refetch_manifest(self, req, resp_iter, orig_slo_attrs):"},{"line_number":839,"context_line":"        req.environ[\u0027swift.non_client_disconnect\u0027] \u003d True"}],"source_content_type":"text/x-python","patch_set":1,"id":"2c899db5_9be20818","line":836,"updated":"2023-09-28 14:35:07.000000000","message":"maybe worth it to leave in-line?  or do `if is_range: return _is_range_complete()`\n\n_is_body_complete seems to assume we already checked request.method at line 822","commit_id":"7d47bba6b21e598abfd8921890499a8513777070"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"daa332f215b04a1dbc1da4f6310a8626e4dff2e8","unresolved":true,"context_lines":[{"line_number":993,"context_line":"        slo_attrs \u003d SloAttrs.from_headers(self._response_headers)"},{"line_number":994,"context_line":"        manifest_needed, manifest_complete \u003d self._need_to_refetch_manifest("},{"line_number":995,"context_line":"            req, slo_attrs, is_manifest_get)"},{"line_number":996,"context_line":"        if manifest_needed and not manifest_complete:"},{"line_number":997,"context_line":"            slo_attrs, resp_iter \u003d self._refetch_manifest("},{"line_number":998,"context_line":"                req, resp_iter, slo_attrs)"},{"line_number":999,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da6c81aa_19a556ca","line":996,"updated":"2023-09-28 14:35:07.000000000","message":"`manifest_needed and not manifest_complete` is the *true* answer for \"_need_to_refresh\" - the method now returns components that callers can use to answer the question of if a refetch is needed.\n\nmaybe _need_to_refetch should still be a boolean, but set an instance attribute on the Context","commit_id":"7d47bba6b21e598abfd8921890499a8513777070"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"daa332f215b04a1dbc1da4f6310a8626e4dff2e8","unresolved":true,"context_lines":[{"line_number":1013,"context_line":"                                             slo_attrs)"},{"line_number":1014,"context_line":""},{"line_number":1015,"context_line":"        # this a GET/HEAD response for the SLO object, not the manifest"},{"line_number":1016,"context_line":"        if manifest_needed:"},{"line_number":1017,"context_line":"            segments \u003d self._parse_segments(resp_iter)"},{"line_number":1018,"context_line":"            slo_attrs \u003d slo_attrs.update_from_segments(segments)"},{"line_number":1019,"context_line":"        if req.method \u003d\u003d \u0027GET\u0027:"}],"source_content_type":"text/x-python","patch_set":1,"id":"6cbcacaf_3515765b","line":1016,"updated":"2023-09-28 14:35:07.000000000","message":"if self.manifest_needed might not be too gross?  at least hightly you have to go check which method has set it and maybe not be too surprised it was a message passed from _need_to_refetch","commit_id":"7d47bba6b21e598abfd8921890499a8513777070"}]}
