)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"718009c56ba8ac988361dd90be8d00b3ebad3412","unresolved":true,"context_lines":[{"line_number":21,"context_line":"shard that caused _get_from_shards to recurse., i.e. a listing of"},{"line_number":22,"context_line":"shard namespaces. This *shard* listing response does not include an"},{"line_number":23,"context_line":"X-Backend-Record-Storage-Policy-Index header. This would cause the"},{"line_number":24,"context_line":"outer _get_from_shards to fail when checking the (missing)"},{"line_number":25,"context_line":"X-Backend-Record-Storage-Policy-Index in the response from the inner"},{"line_number":26,"context_line":"_get_from_shards."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"This patch adds an X-Backend-Record-Storage-Policy-Index header with"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"0fe1c11b_00018758","line":25,"range":{"start_line":24,"start_character":31,"end_line":25,"end_character":37},"updated":"2026-03-25 15:41:55.000000000","message":"But if it\u0027s missing, we should fall back to `shard_resp.headers[\u0027X-Backend-Storage-Policy-Index\u0027]` -- is *that* not getting set, either?? *Shouldn\u0027t* we set it for this amalgamated response?","commit_id":"c2d0b81b3d9913e4012ff0edd839abb7cf812cd7"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3620e262e655c72bbbc766f9be08ca27f9afb465","unresolved":true,"context_lines":[{"line_number":21,"context_line":"shard that caused _get_from_shards to recurse., i.e. a listing of"},{"line_number":22,"context_line":"shard namespaces. This *shard* listing response does not include an"},{"line_number":23,"context_line":"X-Backend-Record-Storage-Policy-Index header. This would cause the"},{"line_number":24,"context_line":"outer _get_from_shards to fail when checking the (missing)"},{"line_number":25,"context_line":"X-Backend-Record-Storage-Policy-Index in the response from the inner"},{"line_number":26,"context_line":"_get_from_shards."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"This patch adds an X-Backend-Record-Storage-Policy-Index header with"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5010233b_9af76186","line":25,"range":{"start_line":24,"start_character":31,"end_line":25,"end_character":37},"in_reply_to":"0fe1c11b_00018758","updated":"2026-04-09 13:06:39.000000000","message":"``\u0027X-Backend-Storage-Policy-Index\u0027`` is in the shard response from the container server, and is propagated in the composite response from _get_from_shards. But, it may not match the ``X-Backend-Record-Storage-Policy-Index`` that was returned with the object listing responses that populated that composite response. So it is necessary to update the composite response with the X-Backend-Record-Storage-Policy-Index header (which we have already asserted matches that returned by the component object listing responses).\n\ntest_GET_sharded_container_sharding_shard_mixed_policies sets up a scenario where the X-Backend-Storage-Policy-Index from the shards response is included in the composite response but does not match the X-Backend-Record-Storage-Policy-Index header; if the change is reverted this mismatch causes a 503 to be raised in _get_from_shards.","commit_id":"c2d0b81b3d9913e4012ff0edd839abb7cf812cd7"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b5a611e21c2c872ac464c0b02c09ffb5d5e8e408","unresolved":true,"context_lines":[{"line_number":21,"context_line":"shard that caused _get_from_shards to recurse., i.e. a listing of"},{"line_number":22,"context_line":"shard namespaces. This *shard* listing response does not include an"},{"line_number":23,"context_line":"X-Backend-Record-Storage-Policy-Index header. This would cause the"},{"line_number":24,"context_line":"outer _get_from_shards to fail when checking the (missing)"},{"line_number":25,"context_line":"X-Backend-Record-Storage-Policy-Index in the response from the inner"},{"line_number":26,"context_line":"_get_from_shards."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"This patch adds an X-Backend-Record-Storage-Policy-Index header with"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"902ebf6b_e05275d7","line":25,"range":{"start_line":24,"start_character":31,"end_line":25,"end_character":37},"in_reply_to":"5010233b_9af76186","updated":"2026-04-09 16:24:04.000000000","message":"\u003e But, it may not match the `X-Backend-Record-Storage-Policy-Index` that was returned with the object listing responses that populated that composite response.\n\nRight -- so this patch is good and necessary -- but for some reason I thought our observed bad behavior was a `KeyError` -- I guess I must be I misremembering?","commit_id":"c2d0b81b3d9913e4012ff0edd839abb7cf812cd7"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"7f5038c6d2ea05d5fe294b9339da6a9897d3f95c","unresolved":true,"context_lines":[{"line_number":34,"context_line":"The unit test/proxy/controllers/test_container.py was previously"},{"line_number":35,"context_line":"incorrectly setting up mocked responses that returned an"},{"line_number":36,"context_line":"X-Backend-Record-Storage-Policy-Index header with *shard* listing"},{"line_number":37,"context_line":"responses. This was masking the bug in _get_from_shards."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Change-Id: I64230275965cbb34eb7917bbc7a2a5f9fff13fe7"},{"line_number":40,"context_line":"Signed-off-by: Alistair Coles \u003calistairncoles@gmail.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9d2421fe_43f4e4ea","line":37,"updated":"2026-03-09 10:09:14.000000000","message":"oh was it! Nice find","commit_id":"c2d0b81b3d9913e4012ff0edd839abb7cf812cd7"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb0c418afc420067e7fbf2632d3eaf9ea7f7b301","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"3ff697f6_0b318d38","updated":"2026-04-09 16:40:49.000000000","message":"The KeyError was https://review.opendev.org/c/openstack/swift/+/978895/3?usp\u003drelated-change\n\nThis patch came out of an observation while fixing the KeyError","commit_id":"c2d0b81b3d9913e4012ff0edd839abb7cf812cd7"}],"swift/proxy/controllers/container.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"7f5038c6d2ea05d5fe294b9339da6a9897d3f95c","unresolved":true,"context_lines":[{"line_number":582,"context_line":"            else:"},{"line_number":583,"context_line":"                # report the requested policy index in the response"},{"line_number":584,"context_line":"                resp.headers[\u0027X-Backend-Record-Storage-Policy-Index\u0027] \u003d \\"},{"line_number":585,"context_line":"                    root_policy"},{"line_number":586,"context_line":"            self.logger.debug("},{"line_number":587,"context_line":"                \u0027Found %d objects in shard (state\u003d%s), total \u003d %d\u0027,"},{"line_number":588,"context_line":"                len(objs), sharding_state, len(objs) + len(objects))"}],"source_content_type":"text/x-python","patch_set":1,"id":"7b81a63d_c9f82025","line":585,"updated":"2026-03-09 10:09:14.000000000","message":"So heres the crux, the rest is just readability, ie root_policy variable and specifiying the header as a string each time.","commit_id":"c2d0b81b3d9913e4012ff0edd839abb7cf812cd7"}],"test/unit/proxy/controllers/test_container.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"7f5038c6d2ea05d5fe294b9339da6a9897d3f95c","unresolved":true,"context_lines":[{"line_number":2753,"context_line":"        #                            GET sub_shard_0 -\u003e objects"},{"line_number":2754,"context_line":"        #                            GET sub_shard_1 -\u003e objects"},{"line_number":2755,"context_line":"        #                            GET filler -\u003e objects"},{"line_number":2756,"context_line":"        #             GET shard_2 -\u003e objects"},{"line_number":2757,"context_line":"        shard_bounds \u003d ((\u0027\u0027, \u0027ham\u0027), (\u0027ham\u0027, \u0027pie\u0027), (\u0027pie\u0027, \u0027\u0027))"},{"line_number":2758,"context_line":"        namespaces, ns_dicts, sr_objs \u003d self.create_server_response_data("},{"line_number":2759,"context_line":"            shard_bounds)"}],"source_content_type":"text/x-python","patch_set":1,"id":"6d32527d_9008c076","line":2756,"updated":"2026-03-09 10:09:14.000000000","message":"BEST. COMMENT. EVER!!","commit_id":"c2d0b81b3d9913e4012ff0edd839abb7cf812cd7"}]}
