)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4976666c431ddbae7c9aae55dbb547e364a72b27","unresolved":true,"context_lines":[{"line_number":33,"context_line":"Because it always hits container server, it\u0027ll always return shard_range"},{"line_number":34,"context_line":"dicts."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"The inter_namespaces interface on the otherhand isn\u0027t as costly, it"},{"line_number":37,"context_line":"doesn\u0027t use x-newest, so will happy return the first response from"},{"line_number":38,"context_line":"either a container server or memcache. As such in anycase the response"},{"line_number":39,"context_line":"will in the form of namespace object dicts. Either directly from"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"31ffe053_b987c7f4","line":36,"updated":"2023-06-27 14:18:15.000000000","message":"typo: iter_namespaces","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"40332089d95c4b7aae68a7da7d125438099daec1","unresolved":false,"context_lines":[{"line_number":33,"context_line":"Because it always hits container server, it\u0027ll always return shard_range"},{"line_number":34,"context_line":"dicts."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"The inter_namespaces interface on the otherhand isn\u0027t as costly, it"},{"line_number":37,"context_line":"doesn\u0027t use x-newest, so will happy return the first response from"},{"line_number":38,"context_line":"either a container server or memcache. As such in anycase the response"},{"line_number":39,"context_line":"will in the form of namespace object dicts. Either directly from"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"02cb2c06_1cae14af","line":36,"in_reply_to":"31ffe053_b987c7f4","updated":"2023-07-03 09:08:39.000000000","message":"Done","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4976666c431ddbae7c9aae55dbb547e364a72b27","unresolved":true,"context_lines":[{"line_number":36,"context_line":"The inter_namespaces interface on the otherhand isn\u0027t as costly, it"},{"line_number":37,"context_line":"doesn\u0027t use x-newest, so will happy return the first response from"},{"line_number":38,"context_line":"either a container server or memcache. As such in anycase the response"},{"line_number":39,"context_line":"will in the form of namespace object dicts. Either directly from"},{"line_number":40,"context_line":"memcache or shard_range dicts converted to namespace dicts."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"All this will allow us to tinker under the hood in the future without"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"73dae82a_f4f3d5d3","line":39,"updated":"2023-06-27 14:18:15.000000000","message":"type : ...will be in the form...","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"40332089d95c4b7aae68a7da7d125438099daec1","unresolved":false,"context_lines":[{"line_number":36,"context_line":"The inter_namespaces interface on the otherhand isn\u0027t as costly, it"},{"line_number":37,"context_line":"doesn\u0027t use x-newest, so will happy return the first response from"},{"line_number":38,"context_line":"either a container server or memcache. As such in anycase the response"},{"line_number":39,"context_line":"will in the form of namespace object dicts. Either directly from"},{"line_number":40,"context_line":"memcache or shard_range dicts converted to namespace dicts."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"All this will allow us to tinker under the hood in the future without"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"fecc5140_2e022daf","line":39,"in_reply_to":"73dae82a_f4f3d5d3","updated":"2023-07-03 09:08:39.000000000","message":"Done","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4976666c431ddbae7c9aae55dbb547e364a72b27","unresolved":true,"context_lines":[{"line_number":40,"context_line":"memcache or shard_range dicts converted to namespace dicts."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"All this will allow us to tinker under the hood in the future without"},{"line_number":43,"context_line":"breaking any upstream or downstream client."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"Change-Id: Ic3be7432c28c7c6846423b803a49fd89fc990914"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"49fe1361_74a4b208","line":43,"updated":"2023-06-27 14:18:15.000000000","message":"I\u0027m sure we could if we tried 😊","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"40332089d95c4b7aae68a7da7d125438099daec1","unresolved":false,"context_lines":[{"line_number":40,"context_line":"memcache or shard_range dicts converted to namespace dicts."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"All this will allow us to tinker under the hood in the future without"},{"line_number":43,"context_line":"breaking any upstream or downstream client."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"Change-Id: Ic3be7432c28c7c6846423b803a49fd89fc990914"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"74e80c4f_f5fff9db","line":43,"in_reply_to":"49fe1361_74a4b208","updated":"2023-07-03 09:08:39.000000000","message":"Ack","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2cfb9c6e3a5603451d104ab0a2647d69299f6604","unresolved":true,"context_lines":[{"line_number":11,"context_line":"to updating shardrange cache keys, we\u0027ve also found downstream clients"},{"line_number":12,"context_line":"that needed to be updated. Further, we\u0027re looking to give the"},{"line_number":13,"context_line":"object-updater the ability to probe for shard_ranges from either root or"},{"line_number":14,"context_line":"cache."},{"line_number":15,"context_line":"The rest of the sharding smarts lives in the proxy and clients that want"},{"line_number":16,"context_line":"to talk sharding use the internal client, so it makes sense to provide"},{"line_number":17,"context_line":"an interface through internal client to do just that."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"8ef82000_1780e1df","line":14,"updated":"2023-07-06 19:39:17.000000000","message":"maybe:\n\nWe have multiple existing and planned use-case for this new interface in the container-sharder, object-updater, and external ic users.","commit_id":"740359f2e5474578d74d5bf2c68faffe97f0ea52"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"fa65d2d875371899b0aebcc6a51a85ba893639c9","unresolved":false,"context_lines":[{"line_number":11,"context_line":"to updating shardrange cache keys, we\u0027ve also found downstream clients"},{"line_number":12,"context_line":"that needed to be updated. Further, we\u0027re looking to give the"},{"line_number":13,"context_line":"object-updater the ability to probe for shard_ranges from either root or"},{"line_number":14,"context_line":"cache."},{"line_number":15,"context_line":"The rest of the sharding smarts lives in the proxy and clients that want"},{"line_number":16,"context_line":"to talk sharding use the internal client, so it makes sense to provide"},{"line_number":17,"context_line":"an interface through internal client to do just that."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"6ea7551e_b35db500","line":14,"in_reply_to":"8ef82000_1780e1df","updated":"2023-07-07 07:30:35.000000000","message":"Ack","commit_id":"740359f2e5474578d74d5bf2c68faffe97f0ea52"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2cfb9c6e3a5603451d104ab0a2647d69299f6604","unresolved":true,"context_lines":[{"line_number":14,"context_line":"cache."},{"line_number":15,"context_line":"The rest of the sharding smarts lives in the proxy and clients that want"},{"line_number":16,"context_line":"to talk sharding use the internal client, so it makes sense to provide"},{"line_number":17,"context_line":"an interface through internal client to do just that."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Unfortunately a single iter_shard_ranges isn\u0027t quite enough now that we use"},{"line_number":20,"context_line":"smaller Namespace objects to store shardranges into memcache. Now there is a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"77976b70_763b0469","line":17,"updated":"2023-07-06 19:39:17.000000000","message":"right, given that we need AN interface, putting it in ic makes the most sense because we leverge existing proxy.","commit_id":"740359f2e5474578d74d5bf2c68faffe97f0ea52"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"fa65d2d875371899b0aebcc6a51a85ba893639c9","unresolved":false,"context_lines":[{"line_number":14,"context_line":"cache."},{"line_number":15,"context_line":"The rest of the sharding smarts lives in the proxy and clients that want"},{"line_number":16,"context_line":"to talk sharding use the internal client, so it makes sense to provide"},{"line_number":17,"context_line":"an interface through internal client to do just that."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Unfortunately a single iter_shard_ranges isn\u0027t quite enough now that we use"},{"line_number":20,"context_line":"smaller Namespace objects to store shardranges into memcache. Now there is a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"5b9248f1_5c0df9c5","line":17,"in_reply_to":"77976b70_763b0469","updated":"2023-07-07 07:30:35.000000000","message":"Ack","commit_id":"740359f2e5474578d74d5bf2c68faffe97f0ea52"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2cfb9c6e3a5603451d104ab0a2647d69299f6604","unresolved":true,"context_lines":[{"line_number":29,"context_line":"to _always_ go back to the container servers to the latest shard ranges."},{"line_number":30,"context_line":"This is exactly what the container-sharder uses the interface for."},{"line_number":31,"context_line":"Because it always hits container server, it\u0027ll always return a generator"},{"line_number":32,"context_line":"of ShardRange objects."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"The iter_namespaces interface on the other hand isn\u0027t as costly, it"},{"line_number":35,"context_line":"doesn\u0027t use x-newest, so will happy return the first response from"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"51947699_df3ade44","line":32,"updated":"2023-07-06 19:39:17.000000000","message":"ok, that makes sense.","commit_id":"740359f2e5474578d74d5bf2c68faffe97f0ea52"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"fa65d2d875371899b0aebcc6a51a85ba893639c9","unresolved":false,"context_lines":[{"line_number":29,"context_line":"to _always_ go back to the container servers to the latest shard ranges."},{"line_number":30,"context_line":"This is exactly what the container-sharder uses the interface for."},{"line_number":31,"context_line":"Because it always hits container server, it\u0027ll always return a generator"},{"line_number":32,"context_line":"of ShardRange objects."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"The iter_namespaces interface on the other hand isn\u0027t as costly, it"},{"line_number":35,"context_line":"doesn\u0027t use x-newest, so will happy return the first response from"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"d66c5fe5_2f7ca097","line":32,"in_reply_to":"51947699_df3ade44","updated":"2023-07-07 07:30:35.000000000","message":"Ack","commit_id":"740359f2e5474578d74d5bf2c68faffe97f0ea52"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2cfb9c6e3a5603451d104ab0a2647d69299f6604","unresolved":true,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"The iter_namespaces interface on the other hand isn\u0027t as costly, it"},{"line_number":35,"context_line":"doesn\u0027t use x-newest, so will happy return the first response from"},{"line_number":36,"context_line":"either a container server or memcache. As such no matter what the"},{"line_number":37,"context_line":"resulting response it\u0027ll be converted into Namespace objects."},{"line_number":38,"context_line":"will be in the form of namespace object dicts. Either directly from"},{"line_number":39,"context_line":"memcache or shard_range dicts converted to Namespace objects."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"1d9f791b_d3aadb34","line":36,"updated":"2023-07-06 19:39:17.000000000","message":"does this happen transparetly in the proxy?  I didn\u0027t see a branch in _iter_shard_ranges - it seemed like it always called into the app, and I didn\u0027t think the proxy would ever return shit from memcache as a http response.","commit_id":"740359f2e5474578d74d5bf2c68faffe97f0ea52"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"fa65d2d875371899b0aebcc6a51a85ba893639c9","unresolved":true,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"The iter_namespaces interface on the other hand isn\u0027t as costly, it"},{"line_number":35,"context_line":"doesn\u0027t use x-newest, so will happy return the first response from"},{"line_number":36,"context_line":"either a container server or memcache. As such no matter what the"},{"line_number":37,"context_line":"resulting response it\u0027ll be converted into Namespace objects."},{"line_number":38,"context_line":"will be in the form of namespace object dicts. Either directly from"},{"line_number":39,"context_line":"memcache or shard_range dicts converted to Namespace objects."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"af5b9d3b_9e4df150","line":36,"in_reply_to":"1d9f791b_d3aadb34","updated":"2023-07-07 07:30:35.000000000","message":"Oh it does it transparently by having `cache` in the internal client pipeline, like we have downstream. Without it, it\u0027ll still go to the continer server but still be a cheaper call becuase it wont use X-Newest \u003d True.","commit_id":"740359f2e5474578d74d5bf2c68faffe97f0ea52"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2cfb9c6e3a5603451d104ab0a2647d69299f6604","unresolved":true,"context_lines":[{"line_number":36,"context_line":"either a container server or memcache. As such no matter what the"},{"line_number":37,"context_line":"resulting response it\u0027ll be converted into Namespace objects."},{"line_number":38,"context_line":"will be in the form of namespace object dicts. Either directly from"},{"line_number":39,"context_line":"memcache or shard_range dicts converted to Namespace objects."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"All this will allow us to tinker under the hood in the future without"},{"line_number":42,"context_line":"breaking any upstream or downstream client."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"c900aeab_37eeebe3","line":39,"updated":"2023-07-06 19:39:17.000000000","message":"one down-side of this interface is that it creates Namespace objects for ALL the shard ranges - expecting clients to handle the bisecting lower/upper to find the correct shard range.  If I have a single a/c/o in-hand and want to know \"which shard range db should I talk to\" I don\u0027t NEED to build all those objects - I just need one.\n\nIf we have a cache accelerated interface that can answer \"which sr do I talk to\" (see _get_update_shard in proxy.controller.obj) it would be trivial for backend code to consume and share cache with proxy.  If they have to do a MANY lookups we can expect the caching to be a huge benifit (even if the full sr list is not cached on the first lookup, the next get_update_shard call shouldn\u0027t need to go to the backed).  Only if we\u0027re doing a TON of lookups would we *maybe* want to think about minimizing the memcache queries... but i\u0027m not convicned that\u0027s a huge problem considering how the proxy handles many many PUT requests using updating sr memcache effectively.","commit_id":"740359f2e5474578d74d5bf2c68faffe97f0ea52"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2cfb9c6e3a5603451d104ab0a2647d69299f6604","unresolved":true,"context_lines":[{"line_number":39,"context_line":"memcache or shard_range dicts converted to Namespace objects."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"All this will allow us to tinker under the hood in the future without"},{"line_number":42,"context_line":"breaking any upstream or downstream client."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"Change-Id: Ic3be7432c28c7c6846423b803a49fd89fc990914"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"c15a0011_ad62af05","line":42,"updated":"2023-07-06 19:39:17.000000000","message":"right, stable maintained interfaces are better than forcing consumers to sneak around behind the scenes.","commit_id":"740359f2e5474578d74d5bf2c68faffe97f0ea52"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"aaebe44076106d577c5eb5533561a3a5ccd91ae3","unresolved":true,"context_lines":[{"line_number":21,"context_line":"   iter_namespaces"},{"line_number":22,"context_line":"   iter_namespaces_from_cache"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"The iter_shard_ranges interface is more expensive, as it\u0027ll use x-newest"},{"line_number":25,"context_line":"to _always_ go back to the container servers to the latest shard ranges."},{"line_number":26,"context_line":"This is exactly what the container-sharder uses the interface for."},{"line_number":27,"context_line":"Because it always hits container server, it\u0027ll always return a generator"},{"line_number":28,"context_line":"of ShardRange objects."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"d658c3db_f752b719","line":25,"range":{"start_line":24,"start_character":64,"end_line":25,"end_character":19},"updated":"2024-02-07 07:12:35.000000000","message":"Can remove the need for x-newest now that it always goes back, might add it as an option","commit_id":"36d73a026e4534a8a55bb242ebd4cd3eeaf2ee0e"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"693481254311697557f453deaaafd8287a099830","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"d50b2dcd_f8df3a61","updated":"2023-03-17 16:29:23.000000000","message":"I may be wrong, but I\u0027m not sure the new method will always work as intended because it relies on allow_modify_pipeline\u003dFalse being used","commit_id":"4d7acc7e440be20b0a075931349e02955b2da5f8"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"086a895867acf497d67763b1efe21ab0454ee494","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"38db0a9b_741b8db9","updated":"2023-03-16 06:33:53.000000000","message":"Just throwing something up, this is the rough idea here. Still reworking the sharder unittests and then will write up a bunch new internal_client inter_shard_range tests.\n\nThe hopes is which this we can use the same thing in the object-updater, it can grow an internal_client and also access memcache if we simply put the cache in the internal_client pipeline.\n\nNew patchset with tests coming soon!","commit_id":"4d7acc7e440be20b0a075931349e02955b2da5f8"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"b69df0904a05783a956e8d79697752223e333337","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"dfe8f1b2_96c1dc0a","updated":"2023-03-22 06:38:40.000000000","message":"This is still a WIP as I\u0027m currently testing it on my SAIO to make sure it\u0027s working as expected :) ","commit_id":"7360d99badd8b267093deaa1329f5c5e80b966e5"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2cca31c05b16986f60da6f378fa497683be6b84e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"538754ce_8b3f9e36","updated":"2023-03-30 23:34:14.000000000","message":"i don\u0027t think we ever really should have had that as a kwarg - that was my bad https://review.opendev.org/c/openstack/swift/+/77042","commit_id":"1daa155d0ba31130eb562803026c2f13d56a769b"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"b04101c7cf104ad5d3037d22afd37628bd00986f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"c34a9945_b59e10ad","updated":"2023-04-19 06:43:03.000000000","message":"Thanks al, I have a new version that covers some of the comments. Also needs a rebase.\n\nNeed to think about the error handling in the interface some, so will sleep on the new patch and push it up in the morning.","commit_id":"e095c377ccf9a2536075259d5941bc2bdedc053f"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"876f4658f6fcb8e43bdf36d31dc2d8231daa01e4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"0f84e3d5_431f5685","updated":"2023-04-26 18:14:50.000000000","message":"I\u0027m not sure the desired scope for this interface.  Having an internal client method that knows how to list contaier root shard ranges form the root db on demand might be generally useful.\n\nBut, if the interface we really want to expose is going to explicitly always use memcache maybe it would make more sense to just expose \"get_update_shard\" and the updater can call it with every \"db_state \u003d\u003d is_sharded\" to fid the target (leveraging the *real* iter_shard_ranges and the memcache acceleration when available)","commit_id":"bbee1494fce1d33300a3ab6487bf6f18b97c99bb"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"667b1e139ce71ac1cf9f384e893e847cd5d8a7a5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"31936dff_17831e55","updated":"2023-05-09 06:26:41.000000000","message":"Will whip up a dual inter_{shard,namespace} interface and see how it shakes out.","commit_id":"46ffe6c73fc0b1e9f1001f1288823a0365ce13f1"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"da78f8bd912573feb99e0c9d0b609777e2ff2683","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"982a5322_d7912269","updated":"2023-05-09 07:03:32.000000000","message":"maybe something similar to https://review.opendev.org/c/openstack/swift/+/882671 (just a very quick whip up as a rough idea). If we like the direction I\u0027d clean it up and squash it down.","commit_id":"46ffe6c73fc0b1e9f1001f1288823a0365ce13f1"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"d19337617ebd9ddc2cb2afb1154eedfcc54e7f3e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"34eeba63_c644a2d5","updated":"2023-06-27 06:55:21.000000000","message":"Squashed the 2 iters follow up down. See: https://review.opendev.org/c/openstack/swift/+/882671 for more conversion details.\n\nNo doubt tests need to be update and written for the iter_namespaces iterface.","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4976666c431ddbae7c9aae55dbb547e364a72b27","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"cfa8a449_2d7e2e45","updated":"2023-06-27 14:18:15.000000000","message":"This seems reasonable.\n\nI am aware of 3 use cases:\n1. the existing sharder fetch_shard_ranges\n2. a proprietary use case that would be happy to get lists of Namespace objects\n3. a proposed updater change that would be happy to get a list or singular Namespace object\n\nThis direction satisfies all three.","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2cfb9c6e3a5603451d104ab0a2647d69299f6604","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"776294fd_f191fb6a","updated":"2023-07-06 19:39:17.000000000","message":"I need some help trying to understand the currenct thinking for this design.\n\nThe commit message has some line wrapping going on.  I didn\u0027t look into the zuul test failures.","commit_id":"740359f2e5474578d74d5bf2c68faffe97f0ea52"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"aaebe44076106d577c5eb5533561a3a5ccd91ae3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"dab878d0_b78e869c","updated":"2024-02-07 07:12:35.000000000","message":"This is still a WIP. But added a new get namespaces from cache interface.\n\nStill some cleanup to go, like removing the need for X-newest","commit_id":"36d73a026e4534a8a55bb242ebd4cd3eeaf2ee0e"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"e63c5d8763b94f88480d2e37de031a08ab6f39b7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"b1956e77_725f51d6","updated":"2024-02-13 05:37:07.000000000","message":"We cache a simplified version of namespaces in memcache (only a tuple of name and lower), I kind of feel they are for internal access only. If we are going to need an interface to read those cached namespace tuples, maybe gizmo tool or direct client will be a better choice? it seems to me that direct client talks to source directly and internal client talks to proxy controllers. would like to hear opinions from other people too.","commit_id":"f0572c58a5bc32d9ab225254551e238e6a9e14dc"}],"swift/common/internal_client.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"693481254311697557f453deaaafd8287a099830","unresolved":true,"context_lines":[{"line_number":631,"context_line":"        path \u003d self.make_path(account, container)"},{"line_number":632,"context_line":"        headers \u003d {\u0027X-Backend-Record-Type\u0027: \u0027shard\u0027,"},{"line_number":633,"context_line":"                   \u0027X-Backend-Override-Deleted\u0027: str(override_deleted),"},{"line_number":634,"context_line":"                   \u0027X-Backend-Include-Deleted\u0027: str(include_deleted)}"},{"line_number":635,"context_line":"        if newest:"},{"line_number":636,"context_line":"            headers[\u0027X-Newest\u0027] \u003d \u0027true\u0027"},{"line_number":637,"context_line":"        params \u003d {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"615ef3a6_dcc7202f","line":634,"updated":"2023-03-17 16:29:23.000000000","message":"I think these will only get passed through to the proxy and backend if the client is constructed with allow_modify_pipeline\u003dFalse ? If they are not passed through then the return value will be ... objects?","commit_id":"4d7acc7e440be20b0a075931349e02955b2da5f8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1a4a441c649893209ab6bab629a39ba565921618","unresolved":false,"context_lines":[{"line_number":631,"context_line":"        path \u003d self.make_path(account, container)"},{"line_number":632,"context_line":"        headers \u003d {\u0027X-Backend-Record-Type\u0027: \u0027shard\u0027,"},{"line_number":633,"context_line":"                   \u0027X-Backend-Override-Deleted\u0027: str(override_deleted),"},{"line_number":634,"context_line":"                   \u0027X-Backend-Include-Deleted\u0027: str(include_deleted)}"},{"line_number":635,"context_line":"        if newest:"},{"line_number":636,"context_line":"            headers[\u0027X-Newest\u0027] \u003d \u0027true\u0027"},{"line_number":637,"context_line":"        params \u003d {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"ebd0f4d7_958efb91","line":634,"in_reply_to":"3c6d657b_057a9034","updated":"2023-04-14 10:24:12.000000000","message":"Done","commit_id":"4d7acc7e440be20b0a075931349e02955b2da5f8"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"7ff90faf1b0d4ab3460eab91d5b55a1249c26e69","unresolved":true,"context_lines":[{"line_number":631,"context_line":"        path \u003d self.make_path(account, container)"},{"line_number":632,"context_line":"        headers \u003d {\u0027X-Backend-Record-Type\u0027: \u0027shard\u0027,"},{"line_number":633,"context_line":"                   \u0027X-Backend-Override-Deleted\u0027: str(override_deleted),"},{"line_number":634,"context_line":"                   \u0027X-Backend-Include-Deleted\u0027: str(include_deleted)}"},{"line_number":635,"context_line":"        if newest:"},{"line_number":636,"context_line":"            headers[\u0027X-Newest\u0027] \u003d \u0027true\u0027"},{"line_number":637,"context_line":"        params \u003d {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"3c6d657b_057a9034","line":634,"in_reply_to":"615ef3a6_dcc7202f","updated":"2023-03-22 04:39:16.000000000","message":"Great point Al. Maybe something like: https://review.opendev.org/c/openstack/swift/+/878188\n\nAs one approach that isn\u0027t making a special case child class/client of internalclient?","commit_id":"4d7acc7e440be20b0a075931349e02955b2da5f8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1a4a441c649893209ab6bab629a39ba565921618","unresolved":true,"context_lines":[{"line_number":618,"context_line":"        Returns an iterator of shard range dicts from a container."},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"        :param account: The container\u0027s account."},{"line_number":621,"context_line":"        :param container: Container to iterate objects on."},{"line_number":622,"context_line":"        :param marker: Prefix of first desired item, defaults to \u0027\u0027."},{"line_number":623,"context_line":"        :param end_marker: Last item returned will be \u0027less\u0027 than this,"},{"line_number":624,"context_line":"                           defaults to \u0027\u0027."}],"source_content_type":"text/x-python","patch_set":6,"id":"d5b0d2ce_e2f03d4f","line":621,"range":{"start_line":621,"start_character":47,"end_line":621,"end_character":54},"updated":"2023-04-14 10:24:12.000000000","message":"s/objects/shards/","commit_id":"e095c377ccf9a2536075259d5941bc2bdedc053f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"b04101c7cf104ad5d3037d22afd37628bd00986f","unresolved":false,"context_lines":[{"line_number":618,"context_line":"        Returns an iterator of shard range dicts from a container."},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"        :param account: The container\u0027s account."},{"line_number":621,"context_line":"        :param container: Container to iterate objects on."},{"line_number":622,"context_line":"        :param marker: Prefix of first desired item, defaults to \u0027\u0027."},{"line_number":623,"context_line":"        :param end_marker: Last item returned will be \u0027less\u0027 than this,"},{"line_number":624,"context_line":"                           defaults to \u0027\u0027."}],"source_content_type":"text/x-python","patch_set":6,"id":"1ca896b3_3ff9263b","line":621,"range":{"start_line":621,"start_character":47,"end_line":621,"end_character":54},"in_reply_to":"d5b0d2ce_e2f03d4f","updated":"2023-04-19 06:43:03.000000000","message":"Done","commit_id":"e095c377ccf9a2536075259d5941bc2bdedc053f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1a4a441c649893209ab6bab629a39ba565921618","unresolved":true,"context_lines":[{"line_number":621,"context_line":"        :param container: Container to iterate objects on."},{"line_number":622,"context_line":"        :param marker: Prefix of first desired item, defaults to \u0027\u0027."},{"line_number":623,"context_line":"        :param end_marker: Last item returned will be \u0027less\u0027 than this,"},{"line_number":624,"context_line":"                           defaults to \u0027\u0027."},{"line_number":625,"context_line":"        :param includes: Optional, return the shardrange to which this obj"},{"line_number":626,"context_line":"                         belongs."},{"line_number":627,"context_line":"        :param states: An optional list of either the string or integer"}],"source_content_type":"text/x-python","patch_set":6,"id":"11bd8413_bf717a5e","line":624,"updated":"2023-04-14 10:24:12.000000000","message":"marker and end_marker should probably be described as they are for the backend get_shard_ranges()\n\n          :param marker: restricts the returned list to shard ranges whose\n            namespace includes or is greater than the marker value.\n        :param end_marker: restricts the returned list to shard ranges whose\n            namespace includes or is less than the end_marker value.\n        :param includes: restricts the returned list to the shard range that\n            includes the given value; if ``includes`` is specified then\n            ``marker`` and ``end_marker`` are ignored.\n            \n            \nAlso, is the caller expected to make wsgify them? the sharder does","commit_id":"e095c377ccf9a2536075259d5941bc2bdedc053f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"b04101c7cf104ad5d3037d22afd37628bd00986f","unresolved":true,"context_lines":[{"line_number":621,"context_line":"        :param container: Container to iterate objects on."},{"line_number":622,"context_line":"        :param marker: Prefix of first desired item, defaults to \u0027\u0027."},{"line_number":623,"context_line":"        :param end_marker: Last item returned will be \u0027less\u0027 than this,"},{"line_number":624,"context_line":"                           defaults to \u0027\u0027."},{"line_number":625,"context_line":"        :param includes: Optional, return the shardrange to which this obj"},{"line_number":626,"context_line":"                         belongs."},{"line_number":627,"context_line":"        :param states: An optional list of either the string or integer"}],"source_content_type":"text/x-python","patch_set":6,"id":"e25ed741_117da2ab","line":624,"in_reply_to":"11bd8413_bf717a5e","updated":"2023-04-19 06:43:03.000000000","message":"Thanks for the wording, your right much better. I was just being lazy.\n\nWell instead of generating the params string manually this interface is calling the Request.params setter method which urlencodes them.. maybe I still need to check for not bytes and encode things.. I\u0027m not sure. Might be a good test.. I\u0027ll have a play!","commit_id":"e095c377ccf9a2536075259d5941bc2bdedc053f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"9e9a7961343b9269661f34de52bedd54c55c03f6","unresolved":false,"context_lines":[{"line_number":621,"context_line":"        :param container: Container to iterate objects on."},{"line_number":622,"context_line":"        :param marker: Prefix of first desired item, defaults to \u0027\u0027."},{"line_number":623,"context_line":"        :param end_marker: Last item returned will be \u0027less\u0027 than this,"},{"line_number":624,"context_line":"                           defaults to \u0027\u0027."},{"line_number":625,"context_line":"        :param includes: Optional, return the shardrange to which this obj"},{"line_number":626,"context_line":"                         belongs."},{"line_number":627,"context_line":"        :param states: An optional list of either the string or integer"}],"source_content_type":"text/x-python","patch_set":6,"id":"83fccd91_5ffa5a2c","line":624,"in_reply_to":"e25ed741_117da2ab","updated":"2023-04-21 14:07:35.000000000","message":"Done","commit_id":"e095c377ccf9a2536075259d5941bc2bdedc053f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1a4a441c649893209ab6bab629a39ba565921618","unresolved":true,"context_lines":[{"line_number":659,"context_line":"            params[\u0027end_marker\u0027] \u003d end_marker"},{"line_number":660,"context_line":""},{"line_number":661,"context_line":"        resp \u003d self.make_request("},{"line_number":662,"context_line":"            \u0027GET\u0027, path, headers, acceptable_statuses\u003d(2,),"},{"line_number":663,"context_line":"            params\u003dparams)"},{"line_number":664,"context_line":"        record_type \u003d resp.headers.get(\u0027x-backend-record-type\u0027)"},{"line_number":665,"context_line":"        if record_type !\u003d \u0027shard\u0027:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a335744_62d9f069","line":662,"range":{"start_line":662,"start_character":34,"end_line":662,"end_character":58},"updated":"2023-04-14 10:24:12.000000000","message":"this shouldn\u0027t be hard-coded - should use the acceptable_statuses arg","commit_id":"e095c377ccf9a2536075259d5941bc2bdedc053f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"f8f5afcc44237e173c663958fada174a2c36f5d1","unresolved":false,"context_lines":[{"line_number":659,"context_line":"            params[\u0027end_marker\u0027] \u003d end_marker"},{"line_number":660,"context_line":""},{"line_number":661,"context_line":"        resp \u003d self.make_request("},{"line_number":662,"context_line":"            \u0027GET\u0027, path, headers, acceptable_statuses\u003d(2,),"},{"line_number":663,"context_line":"            params\u003dparams)"},{"line_number":664,"context_line":"        record_type \u003d resp.headers.get(\u0027x-backend-record-type\u0027)"},{"line_number":665,"context_line":"        if record_type !\u003d \u0027shard\u0027:"}],"source_content_type":"text/x-python","patch_set":6,"id":"6f657de9_4f49d2dd","line":662,"range":{"start_line":662,"start_character":34,"end_line":662,"end_character":58},"in_reply_to":"3a335744_62d9f069","updated":"2023-04-26 01:56:40.000000000","message":"Done","commit_id":"e095c377ccf9a2536075259d5941bc2bdedc053f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"8d73afff04d14cc476e8cf806f970350ae1f00f5","unresolved":true,"context_lines":[{"line_number":669,"context_line":"            data \u003d json.loads(resp.body)"},{"line_number":670,"context_line":"            for item in data:"},{"line_number":671,"context_line":"                # check to see if its a ShardRange dict"},{"line_number":672,"context_line":"                ShardRange.from_dict(item)"},{"line_number":673,"context_line":"                yield item"},{"line_number":674,"context_line":"        except (ValueError, TypeError, KeyError) as err:"},{"line_number":675,"context_line":"            raise UnexpectedResponse("}],"source_content_type":"text/x-python","patch_set":6,"id":"c050bd4c_22ff9c8b","line":672,"range":{"start_line":672,"start_character":16,"end_line":672,"end_character":42},"updated":"2023-03-31 06:05:22.000000000","message":"Can probably remove this now.. but maybe it doesn\u0027t hurt?","commit_id":"e095c377ccf9a2536075259d5941bc2bdedc053f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"f8f5afcc44237e173c663958fada174a2c36f5d1","unresolved":true,"context_lines":[{"line_number":669,"context_line":"            data \u003d json.loads(resp.body)"},{"line_number":670,"context_line":"            for item in data:"},{"line_number":671,"context_line":"                # check to see if its a ShardRange dict"},{"line_number":672,"context_line":"                ShardRange.from_dict(item)"},{"line_number":673,"context_line":"                yield item"},{"line_number":674,"context_line":"        except (ValueError, TypeError, KeyError) as err:"},{"line_number":675,"context_line":"            raise UnexpectedResponse("}],"source_content_type":"text/x-python","patch_set":6,"id":"514aec2d_5e55204b","line":672,"range":{"start_line":672,"start_character":16,"end_line":672,"end_character":42},"in_reply_to":"6f8a585a_84e949c3","updated":"2023-04-26 01:56:40.000000000","message":"The other iters in internal client return dicts, so keeping it the same.\n\nBut maybe we\u0027ll change our minds when we get Namespace dicts returned.","commit_id":"e095c377ccf9a2536075259d5941bc2bdedc053f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1a4a441c649893209ab6bab629a39ba565921618","unresolved":true,"context_lines":[{"line_number":669,"context_line":"            data \u003d json.loads(resp.body)"},{"line_number":670,"context_line":"            for item in data:"},{"line_number":671,"context_line":"                # check to see if its a ShardRange dict"},{"line_number":672,"context_line":"                ShardRange.from_dict(item)"},{"line_number":673,"context_line":"                yield item"},{"line_number":674,"context_line":"        except (ValueError, TypeError, KeyError) as err:"},{"line_number":675,"context_line":"            raise UnexpectedResponse("}],"source_content_type":"text/x-python","patch_set":6,"id":"6f8a585a_84e949c3","line":672,"range":{"start_line":672,"start_character":16,"end_line":672,"end_character":42},"in_reply_to":"c050bd4c_22ff9c8b","updated":"2023-04-14 10:24:12.000000000","message":"why not yield ShardRange instances?","commit_id":"e095c377ccf9a2536075259d5941bc2bdedc053f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3bb348b5fd583a3e5e8f1d25df00596711df2c67","unresolved":true,"context_lines":[{"line_number":618,"context_line":"            override_deleted\u003dFalse, params\u003dNone,"},{"line_number":619,"context_line":"            acceptable_statuses\u003d(2, HTTP_NOT_FOUND)):"},{"line_number":620,"context_line":"        \"\"\""},{"line_number":621,"context_line":"        Returns an iterator of shard range dicts from a container."},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"        :param account: The container\u0027s account."},{"line_number":624,"context_line":"        :param container: Container to iterate shards on."}],"source_content_type":"text/x-python","patch_set":7,"id":"ae63f855_72a5779b","line":621,"range":{"start_line":621,"start_character":31,"end_line":621,"end_character":48},"updated":"2023-04-24 16:42:35.000000000","message":"If/when https://review.opendev.org/c/openstack/swift/+/876939 merges, this will no longer return fully populated shard range dicts IF the request is served from memcache - it will return a list of Namespace dicts.\n\nIs that still going to be useful for the use-case?\n\nIf the request is served from the backend we will get back shard range dicts, but we have to assume not.","commit_id":"0a14fd3dfc6ab1b2da93d9d3138f8aaad2d2658e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ca50541e1cf7694b24a814b71b07f868a7c75084","unresolved":true,"context_lines":[{"line_number":618,"context_line":"            override_deleted\u003dFalse, params\u003dNone,"},{"line_number":619,"context_line":"            acceptable_statuses\u003d(2, HTTP_NOT_FOUND)):"},{"line_number":620,"context_line":"        \"\"\""},{"line_number":621,"context_line":"        Returns an iterator of shard range dicts from a container."},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"        :param account: The container\u0027s account."},{"line_number":624,"context_line":"        :param container: Container to iterate shards on."}],"source_content_type":"text/x-python","patch_set":7,"id":"118a187d_a747617a","line":621,"range":{"start_line":621,"start_character":31,"end_line":621,"end_character":48},"in_reply_to":"0d626cde_8b5d7e5e","updated":"2023-05-08 20:02:02.000000000","message":"https://review.opendev.org/c/openstack/swift/+/876939 now _has_ merged -- what\u0027s the verdict on how we want to proceed?","commit_id":"0a14fd3dfc6ab1b2da93d9d3138f8aaad2d2658e"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"667b1e139ce71ac1cf9f384e893e847cd5d8a7a5","unresolved":true,"context_lines":[{"line_number":618,"context_line":"            override_deleted\u003dFalse, params\u003dNone,"},{"line_number":619,"context_line":"            acceptable_statuses\u003d(2, HTTP_NOT_FOUND)):"},{"line_number":620,"context_line":"        \"\"\""},{"line_number":621,"context_line":"        Returns an iterator of shard range dicts from a container."},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"        :param account: The container\u0027s account."},{"line_number":624,"context_line":"        :param container: Container to iterate shards on."}],"source_content_type":"text/x-python","patch_set":7,"id":"1e7dd446_b7c1d332","line":621,"range":{"start_line":621,"start_character":31,"end_line":621,"end_character":48},"in_reply_to":"118a187d_a747617a","updated":"2023-05-09 06:26:41.000000000","message":"yeah great question. Al has some ideas, I think to think about it some more. Because yeah the sharder will want shard ranges. But having 2 different dicts returned at different times (and unextected times) is little hard.. so yeah maybe different iters makes sense. One forces newer\u003dTrue, the other forces the returned dicts into Namespace objects, maybe?","commit_id":"0a14fd3dfc6ab1b2da93d9d3138f8aaad2d2658e"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"d19337617ebd9ddc2cb2afb1154eedfcc54e7f3e","unresolved":false,"context_lines":[{"line_number":618,"context_line":"            override_deleted\u003dFalse, params\u003dNone,"},{"line_number":619,"context_line":"            acceptable_statuses\u003d(2, HTTP_NOT_FOUND)):"},{"line_number":620,"context_line":"        \"\"\""},{"line_number":621,"context_line":"        Returns an iterator of shard range dicts from a container."},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"        :param account: The container\u0027s account."},{"line_number":624,"context_line":"        :param container: Container to iterate shards on."}],"source_content_type":"text/x-python","patch_set":7,"id":"fb6684d2_d92021ba","line":621,"range":{"start_line":621,"start_character":31,"end_line":621,"end_character":48},"in_reply_to":"1e7dd446_b7c1d332","updated":"2023-06-27 06:55:21.000000000","message":"Done","commit_id":"0a14fd3dfc6ab1b2da93d9d3138f8aaad2d2658e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"2d3b6dd931fcabb0c4ebd3379a198ed1b5440561","unresolved":true,"context_lines":[{"line_number":618,"context_line":"            override_deleted\u003dFalse, params\u003dNone,"},{"line_number":619,"context_line":"            acceptable_statuses\u003d(2, HTTP_NOT_FOUND)):"},{"line_number":620,"context_line":"        \"\"\""},{"line_number":621,"context_line":"        Returns an iterator of shard range dicts from a container."},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"        :param account: The container\u0027s account."},{"line_number":624,"context_line":"        :param container: Container to iterate shards on."}],"source_content_type":"text/x-python","patch_set":7,"id":"0d626cde_8b5d7e5e","line":621,"range":{"start_line":621,"start_character":31,"end_line":621,"end_character":48},"in_reply_to":"94b5031d_a7c20faf","updated":"2023-04-26 16:38:54.000000000","message":"This is going to be yucky:\n\nWe could force the returned dicts (yes, let\u0027s leave it as a list of dicts) to have only the lowest common denominator i.e. Namespace attributes.\n\nHowever, that sharder uses newest\u003dTrue and definitely expects the full shard range dicts.\n\nIt\u0027s going to be confusing to document the fact that different dicts get returned if you set newest\u003dTrue vs False (in fact IIRC even newest\u003dFalse may get you the full dict if there is a cache miss).\n\nDo we need 2 methods: iter_shard_ranges, iter_namespaces with the only difference being newest\u003dTrue vs False?","commit_id":"0a14fd3dfc6ab1b2da93d9d3138f8aaad2d2658e"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"f8f5afcc44237e173c663958fada174a2c36f5d1","unresolved":true,"context_lines":[{"line_number":618,"context_line":"            override_deleted\u003dFalse, params\u003dNone,"},{"line_number":619,"context_line":"            acceptable_statuses\u003d(2, HTTP_NOT_FOUND)):"},{"line_number":620,"context_line":"        \"\"\""},{"line_number":621,"context_line":"        Returns an iterator of shard range dicts from a container."},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"        :param account: The container\u0027s account."},{"line_number":624,"context_line":"        :param container: Container to iterate shards on."}],"source_content_type":"text/x-python","patch_set":7,"id":"94b5031d_a7c20faf","line":621,"range":{"start_line":621,"start_character":31,"end_line":621,"end_character":48},"in_reply_to":"ae63f855_72a5779b","updated":"2023-04-26 01:56:40.000000000","message":"great point. Yeah, maybe that\u0027ll be an advantage of returning the dicts and not objects. Or maybe not, maybe we\u0027d want to return shardrange objects that we build from namespace objects.. need to think about this some more.","commit_id":"0a14fd3dfc6ab1b2da93d9d3138f8aaad2d2658e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"9e9a7961343b9269661f34de52bedd54c55c03f6","unresolved":true,"context_lines":[{"line_number":645,"context_line":"        :raises UnexpectedResponse: Exception raised when requests fail"},{"line_number":646,"context_line":"                                    to get a response with an acceptable status"},{"line_number":647,"context_line":"        :raises Exception: Exception is raised when code fails in an"},{"line_number":648,"context_line":"                           unexpected way."},{"line_number":649,"context_line":"        \"\"\""},{"line_number":650,"context_line":""},{"line_number":651,"context_line":"        path \u003d self.make_path(account, container)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ead3f8f5_0d86611f","line":648,"updated":"2023-04-21 14:07:35.000000000","message":"I think we should add the more specific ValueError here, or maybe the wrong record type should become an Unexpected Response","commit_id":"0a14fd3dfc6ab1b2da93d9d3138f8aaad2d2658e"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"f8f5afcc44237e173c663958fada174a2c36f5d1","unresolved":false,"context_lines":[{"line_number":645,"context_line":"        :raises UnexpectedResponse: Exception raised when requests fail"},{"line_number":646,"context_line":"                                    to get a response with an acceptable status"},{"line_number":647,"context_line":"        :raises Exception: Exception is raised when code fails in an"},{"line_number":648,"context_line":"                           unexpected way."},{"line_number":649,"context_line":"        \"\"\""},{"line_number":650,"context_line":""},{"line_number":651,"context_line":"        path \u003d self.make_path(account, container)"}],"source_content_type":"text/x-python","patch_set":7,"id":"a2a815c9_090b18dd","line":648,"in_reply_to":"ead3f8f5_0d86611f","updated":"2023-04-26 01:56:40.000000000","message":"As we dicussed I think we decided that an UnextectedResponse means it wasn\u0027t a response in acceptable_statuses.","commit_id":"0a14fd3dfc6ab1b2da93d9d3138f8aaad2d2658e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"9e9a7961343b9269661f34de52bedd54c55c03f6","unresolved":true,"context_lines":[{"line_number":665,"context_line":"        if marker:"},{"line_number":666,"context_line":"            if not isinstance(marker, bytes):"},{"line_number":667,"context_line":"                marker \u003d marker.encode(\u0027utf8\u0027)"},{"line_number":668,"context_line":"            params[\u0027marker\u0027] \u003d bytes_to_wsgi(quote(marker))"},{"line_number":669,"context_line":"        if end_marker:"},{"line_number":670,"context_line":"            if not isinstance(end_marker, bytes):"},{"line_number":671,"context_line":"                end_marker \u003d end_marker.encode(\u0027utf8\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"79724869_a0bbbf2c","line":668,"updated":"2023-04-21 14:07:35.000000000","message":"😭 so sharder does a str_to_wsgi, but we then have to force back to bytes and then do bytes_to_wsgi, in case some other caller sends us bytes??\n\ncan we achieve the same by doing str_to_wsgi here and not in the sharder?","commit_id":"0a14fd3dfc6ab1b2da93d9d3138f8aaad2d2658e"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"f8f5afcc44237e173c663958fada174a2c36f5d1","unresolved":true,"context_lines":[{"line_number":665,"context_line":"        if marker:"},{"line_number":666,"context_line":"            if not isinstance(marker, bytes):"},{"line_number":667,"context_line":"                marker \u003d marker.encode(\u0027utf8\u0027)"},{"line_number":668,"context_line":"            params[\u0027marker\u0027] \u003d bytes_to_wsgi(quote(marker))"},{"line_number":669,"context_line":"        if end_marker:"},{"line_number":670,"context_line":"            if not isinstance(end_marker, bytes):"},{"line_number":671,"context_line":"                end_marker \u003d end_marker.encode(\u0027utf8\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"cce4173c_07b759fd","line":668,"in_reply_to":"3a4b9564_60345858","updated":"2023-04-26 01:56:40.000000000","message":"yeah maybe, we do it a fair few times. Not sure if it\u0027s something we need in swob, but an internalclient helper would simplify it maybe. I\u0027ll give it a go and see what it shakes out like.","commit_id":"0a14fd3dfc6ab1b2da93d9d3138f8aaad2d2658e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"723da590c24807b68a039b3db384339be896b772","unresolved":true,"context_lines":[{"line_number":665,"context_line":"        if marker:"},{"line_number":666,"context_line":"            if not isinstance(marker, bytes):"},{"line_number":667,"context_line":"                marker \u003d marker.encode(\u0027utf8\u0027)"},{"line_number":668,"context_line":"            params[\u0027marker\u0027] \u003d bytes_to_wsgi(quote(marker))"},{"line_number":669,"context_line":"        if end_marker:"},{"line_number":670,"context_line":"            if not isinstance(end_marker, bytes):"},{"line_number":671,"context_line":"                end_marker \u003d end_marker.encode(\u0027utf8\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a4b9564_60345858","line":668,"in_reply_to":"79724869_a0bbbf2c","updated":"2023-04-24 11:01:36.000000000","message":"Is there a case for adding a to_wsgi helper that takes either str or bytes and gives back a native str? i.e. encapsulate:\n\n```\n  if not isinstance(marker, bytes):\n        marker \u003d marker.encode(\u0027utf8\u0027)\n        params[\u0027marker\u0027] \u003d bytes_to_wsgi(quote(marker))\n            ```","commit_id":"0a14fd3dfc6ab1b2da93d9d3138f8aaad2d2658e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4976666c431ddbae7c9aae55dbb547e364a72b27","unresolved":false,"context_lines":[{"line_number":665,"context_line":"        if marker:"},{"line_number":666,"context_line":"            if not isinstance(marker, bytes):"},{"line_number":667,"context_line":"                marker \u003d marker.encode(\u0027utf8\u0027)"},{"line_number":668,"context_line":"            params[\u0027marker\u0027] \u003d bytes_to_wsgi(quote(marker))"},{"line_number":669,"context_line":"        if end_marker:"},{"line_number":670,"context_line":"            if not isinstance(end_marker, bytes):"},{"line_number":671,"context_line":"                end_marker \u003d end_marker.encode(\u0027utf8\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"a7a1621a_317ae1f5","line":668,"in_reply_to":"cce4173c_07b759fd","updated":"2023-06-27 14:18:15.000000000","message":"Done","commit_id":"0a14fd3dfc6ab1b2da93d9d3138f8aaad2d2658e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"723da590c24807b68a039b3db384339be896b772","unresolved":true,"context_lines":[{"line_number":676,"context_line":"            params\u003dparams)"},{"line_number":677,"context_line":"        record_type \u003d resp.headers.get(\u0027x-backend-record-type\u0027)"},{"line_number":678,"context_line":"        if record_type !\u003d \u0027shard\u0027:"},{"line_number":679,"context_line":"            raise ValueError(\u0027Wrong record type: %s\u0027 % record_type, resp)"},{"line_number":680,"context_line":"        data \u003d json.loads(resp.body)"},{"line_number":681,"context_line":"        for item in data:"},{"line_number":682,"context_line":"            # check to see if its a ShardRange dict"}],"source_content_type":"text/x-python","patch_set":7,"id":"0b3f78fd_8c03596c","line":679,"updated":"2023-04-24 11:01:36.000000000","message":"this check is anomalous w.r.t. the rest of InternalClient - But I guess during upgrade the backend server may not understand record-type so could return objects.","commit_id":"0a14fd3dfc6ab1b2da93d9d3138f8aaad2d2658e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4976666c431ddbae7c9aae55dbb547e364a72b27","unresolved":true,"context_lines":[{"line_number":676,"context_line":"            params\u003dparams)"},{"line_number":677,"context_line":"        record_type \u003d resp.headers.get(\u0027x-backend-record-type\u0027)"},{"line_number":678,"context_line":"        if record_type !\u003d \u0027shard\u0027:"},{"line_number":679,"context_line":"            raise ValueError(\u0027Wrong record type: %s\u0027 % record_type, resp)"},{"line_number":680,"context_line":"        data \u003d json.loads(resp.body)"},{"line_number":681,"context_line":"        for item in data:"},{"line_number":682,"context_line":"            # check to see if its a ShardRange dict"}],"source_content_type":"text/x-python","patch_set":7,"id":"a460bd85_a2f6db4f","line":679,"in_reply_to":"0b3f78fd_8c03596c","updated":"2023-06-27 14:18:15.000000000","message":"I\u0027m still unsure how best to handle this - if the backend returns objects, then it has not shard ranges, so should we just yield nothing and return?","commit_id":"0a14fd3dfc6ab1b2da93d9d3138f8aaad2d2658e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"723da590c24807b68a039b3db384339be896b772","unresolved":true,"context_lines":[{"line_number":680,"context_line":"        data \u003d json.loads(resp.body)"},{"line_number":681,"context_line":"        for item in data:"},{"line_number":682,"context_line":"            # check to see if its a ShardRange dict"},{"line_number":683,"context_line":"            ShardRange.from_dict(item)"},{"line_number":684,"context_line":"            yield item"},{"line_number":685,"context_line":""},{"line_number":686,"context_line":"    def iter_objects("}],"source_content_type":"text/x-python","patch_set":7,"id":"5f996069_88429e13","line":683,"updated":"2023-04-24 11:01:36.000000000","message":"I think we could drop this check because the sharder immediately instantiates ShardRanges inside a try/except block","commit_id":"0a14fd3dfc6ab1b2da93d9d3138f8aaad2d2658e"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"f8f5afcc44237e173c663958fada174a2c36f5d1","unresolved":false,"context_lines":[{"line_number":680,"context_line":"        data \u003d json.loads(resp.body)"},{"line_number":681,"context_line":"        for item in data:"},{"line_number":682,"context_line":"            # check to see if its a ShardRange dict"},{"line_number":683,"context_line":"            ShardRange.from_dict(item)"},{"line_number":684,"context_line":"            yield item"},{"line_number":685,"context_line":""},{"line_number":686,"context_line":"    def iter_objects("}],"source_content_type":"text/x-python","patch_set":7,"id":"5a1026b1_f87c68be","line":683,"in_reply_to":"5f996069_88429e13","updated":"2023-04-26 01:56:40.000000000","message":"Done","commit_id":"0a14fd3dfc6ab1b2da93d9d3138f8aaad2d2658e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4976666c431ddbae7c9aae55dbb547e364a72b27","unresolved":true,"context_lines":[{"line_number":329,"context_line":"        while True:"},{"line_number":330,"context_line":"            resp \u003d self.make_request("},{"line_number":331,"context_line":"                \u0027GET\u0027, \u0027%s?format\u003djson\u0026marker\u003d%s\u0026end_marker\u003d%s\u0026prefix\u003d%s\u0027 %"},{"line_number":332,"context_line":"                (path, to_wsgi(marker), to_wsgi(end_marker), to_wsgi(prefix)),"},{"line_number":333,"context_line":"                {}, acceptable_statuses)"},{"line_number":334,"context_line":"            if not resp.status_int \u003d\u003d 200:"},{"line_number":335,"context_line":"                if resp.status_int \u003e\u003d HTTP_MULTIPLE_CHOICES:"}],"source_content_type":"text/x-python","patch_set":9,"id":"fbba3b60_a76209f0","line":332,"updated":"2023-06-27 14:18:15.000000000","message":"useful cleanup","commit_id":"46ffe6c73fc0b1e9f1001f1288823a0365ce13f1"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ca50541e1cf7694b24a814b71b07f868a7c75084","unresolved":true,"context_lines":[{"line_number":631,"context_line":"                       representation of"},{"line_number":632,"context_line":"                       :data:`~swift.common.utils.ShardRange.STATES`."},{"line_number":633,"context_line":"        :param newest: Wait for a response from all primaries and return the"},{"line_number":634,"context_line":"                       latest/newest response."},{"line_number":635,"context_line":"        :param include_deleted: Include shardranges marked as deleted."},{"line_number":636,"context_line":"        :param override_deleted: Check a container even if it\u0027s marked as"},{"line_number":637,"context_line":"                                 deleted."}],"source_content_type":"text/x-python","patch_set":9,"id":"9907e6f0_bdbc889f","line":634,"updated":"2023-05-08 20:02:02.000000000","message":"This should highlight how it changes our willingness to create responses based on data in memcache: https://github.com/openstack/swift/blob/master/swift/proxy/controllers/container.py#L335-L336","commit_id":"46ffe6c73fc0b1e9f1001f1288823a0365ce13f1"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"6ef59eb22067919e2118e18ef185654d0fed36b2","unresolved":true,"context_lines":[{"line_number":631,"context_line":"                       representation of"},{"line_number":632,"context_line":"                       :data:`~swift.common.utils.ShardRange.STATES`."},{"line_number":633,"context_line":"        :param newest: Wait for a response from all primaries and return the"},{"line_number":634,"context_line":"                       latest/newest response."},{"line_number":635,"context_line":"        :param include_deleted: Include shardranges marked as deleted."},{"line_number":636,"context_line":"        :param override_deleted: Check a container even if it\u0027s marked as"},{"line_number":637,"context_line":"                                 deleted."}],"source_content_type":"text/x-python","patch_set":9,"id":"62957bc2_7f3cd9b0","line":634,"in_reply_to":"9907e6f0_bdbc889f","updated":"2024-02-12 06:23:40.000000000","message":"In the new world order, this wont hit memcache anymore. Because now memcache is only checked if record_type is auto. Because this is either shard or overwritten to namespace in iter_namespaces, these will always goto the backend.. newest now just means it\u0027ll take longer :P","commit_id":"46ffe6c73fc0b1e9f1001f1288823a0365ce13f1"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4976666c431ddbae7c9aae55dbb547e364a72b27","unresolved":true,"context_lines":[{"line_number":611,"context_line":""},{"line_number":612,"context_line":"    def iter_shard_ranges("},{"line_number":613,"context_line":"            self, account, container, marker\u003d\u0027\u0027, end_marker\u003d\u0027\u0027, includes\u003dNone,"},{"line_number":614,"context_line":"            states\u003d[], include_deleted\u003dFalse, override_deleted\u003dFalse,"},{"line_number":615,"context_line":"            params\u003dNone, acceptable_statuses\u003d(2, HTTP_NOT_FOUND)):"},{"line_number":616,"context_line":"        \"\"\""},{"line_number":617,"context_line":"        Returns an iterator of shard range dicts from a container. This is"}],"source_content_type":"text/x-python","patch_set":10,"id":"c5157759_5c9dd282","line":614,"updated":"2023-06-27 14:18:15.000000000","message":"use states\u003dNone and only apply default in _iter_shard_ranges","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"40332089d95c4b7aae68a7da7d125438099daec1","unresolved":false,"context_lines":[{"line_number":611,"context_line":""},{"line_number":612,"context_line":"    def iter_shard_ranges("},{"line_number":613,"context_line":"            self, account, container, marker\u003d\u0027\u0027, end_marker\u003d\u0027\u0027, includes\u003dNone,"},{"line_number":614,"context_line":"            states\u003d[], include_deleted\u003dFalse, override_deleted\u003dFalse,"},{"line_number":615,"context_line":"            params\u003dNone, acceptable_statuses\u003d(2, HTTP_NOT_FOUND)):"},{"line_number":616,"context_line":"        \"\"\""},{"line_number":617,"context_line":"        Returns an iterator of shard range dicts from a container. This is"}],"source_content_type":"text/x-python","patch_set":10,"id":"8b5921d2_5d571261","line":614,"in_reply_to":"c5157759_5c9dd282","updated":"2023-07-03 09:08:39.000000000","message":"Done","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4976666c431ddbae7c9aae55dbb547e364a72b27","unresolved":true,"context_lines":[{"line_number":633,"context_line":"                       representation of"},{"line_number":634,"context_line":"                       :data:`~swift.common.utils.ShardRange.STATES`."},{"line_number":635,"context_line":"        :param newest: Wait for a response from all primaries and return the"},{"line_number":636,"context_line":"                       latest/newest response."},{"line_number":637,"context_line":"        :param include_deleted: Include shardranges marked as deleted."},{"line_number":638,"context_line":"        :param override_deleted: Check a container even if it\u0027s marked as"},{"line_number":639,"context_line":"                                 deleted."}],"source_content_type":"text/x-python","patch_set":10,"id":"da45f9f1_c6f4e189","line":636,"updated":"2023-06-27 14:18:15.000000000","message":"newest needs to be deleted","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"40332089d95c4b7aae68a7da7d125438099daec1","unresolved":false,"context_lines":[{"line_number":633,"context_line":"                       representation of"},{"line_number":634,"context_line":"                       :data:`~swift.common.utils.ShardRange.STATES`."},{"line_number":635,"context_line":"        :param newest: Wait for a response from all primaries and return the"},{"line_number":636,"context_line":"                       latest/newest response."},{"line_number":637,"context_line":"        :param include_deleted: Include shardranges marked as deleted."},{"line_number":638,"context_line":"        :param override_deleted: Check a container even if it\u0027s marked as"},{"line_number":639,"context_line":"                                 deleted."}],"source_content_type":"text/x-python","patch_set":10,"id":"b8617ee4_81e457bb","line":636,"in_reply_to":"da45f9f1_c6f4e189","updated":"2023-07-03 09:08:39.000000000","message":"Done","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4976666c431ddbae7c9aae55dbb547e364a72b27","unresolved":true,"context_lines":[{"line_number":643,"context_line":"        :raises UnexpectedResponse: Exception raised when requests fail"},{"line_number":644,"context_line":"                                    to get a response with an acceptable status"},{"line_number":645,"context_line":"        :raises Exception: Exception is raised when code fails in an"},{"line_number":646,"context_line":"                           unexpected way."},{"line_number":647,"context_line":"        \"\"\""},{"line_number":648,"context_line":"        for item in self._iter_shard_ranges("},{"line_number":649,"context_line":"                account\u003daccount, container\u003dcontainer, marker\u003dmarker,"}],"source_content_type":"text/x-python","patch_set":10,"id":"f1eef69c_c35cbacb","line":646,"updated":"2023-06-27 14:18:15.000000000","message":"for completeness, needs a :return:","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"40332089d95c4b7aae68a7da7d125438099daec1","unresolved":false,"context_lines":[{"line_number":643,"context_line":"        :raises UnexpectedResponse: Exception raised when requests fail"},{"line_number":644,"context_line":"                                    to get a response with an acceptable status"},{"line_number":645,"context_line":"        :raises Exception: Exception is raised when code fails in an"},{"line_number":646,"context_line":"                           unexpected way."},{"line_number":647,"context_line":"        \"\"\""},{"line_number":648,"context_line":"        for item in self._iter_shard_ranges("},{"line_number":649,"context_line":"                account\u003daccount, container\u003dcontainer, marker\u003dmarker,"}],"source_content_type":"text/x-python","patch_set":10,"id":"790428ef_027b0616","line":646,"in_reply_to":"f1eef69c_c35cbacb","updated":"2023-07-03 09:08:39.000000000","message":"Done","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4976666c431ddbae7c9aae55dbb547e364a72b27","unresolved":true,"context_lines":[{"line_number":651,"context_line":"                newest\u003dTrue, include_deleted\u003dinclude_deleted,"},{"line_number":652,"context_line":"                override_delete\u003doverride_deleted, params\u003dparams,"},{"line_number":653,"context_line":"                acceptable_statuses\u003dacceptable_statuses):"},{"line_number":654,"context_line":"            yield item"},{"line_number":655,"context_line":""},{"line_number":656,"context_line":"    def iter_namespaces("},{"line_number":657,"context_line":"            self, account, container, marker\u003d\u0027\u0027, end_marker\u003d\u0027\u0027, includes\u003dNone,"}],"source_content_type":"text/x-python","patch_set":10,"id":"36872538_1891052a","line":654,"updated":"2023-06-27 14:18:15.000000000","message":"or shardRange.from_dict(item)","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"40332089d95c4b7aae68a7da7d125438099daec1","unresolved":false,"context_lines":[{"line_number":651,"context_line":"                newest\u003dTrue, include_deleted\u003dinclude_deleted,"},{"line_number":652,"context_line":"                override_delete\u003doverride_deleted, params\u003dparams,"},{"line_number":653,"context_line":"                acceptable_statuses\u003dacceptable_statuses):"},{"line_number":654,"context_line":"            yield item"},{"line_number":655,"context_line":""},{"line_number":656,"context_line":"    def iter_namespaces("},{"line_number":657,"context_line":"            self, account, container, marker\u003d\u0027\u0027, end_marker\u003d\u0027\u0027, includes\u003dNone,"}],"source_content_type":"text/x-python","patch_set":10,"id":"c9ef8322_4999bfb7","line":654,"in_reply_to":"36872538_1891052a","updated":"2023-07-03 09:08:39.000000000","message":"Done","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4976666c431ddbae7c9aae55dbb547e364a72b27","unresolved":true,"context_lines":[{"line_number":686,"context_line":"        :raises UnexpectedResponse: Exception raised when requests fail"},{"line_number":687,"context_line":"                                    to get a response with an acceptable status"},{"line_number":688,"context_line":"        :raises Exception: Exception is raised when code fails in an"},{"line_number":689,"context_line":"                           unexpected way."},{"line_number":690,"context_line":"        \"\"\""},{"line_number":691,"context_line":"        for item in self._iter_shard_ranges("},{"line_number":692,"context_line":"                account\u003daccount, container\u003dcontainer, marker\u003dmarker,"}],"source_content_type":"text/x-python","patch_set":10,"id":"b37c2c67_6285df04","line":689,"updated":"2023-06-27 14:18:15.000000000","message":"for completeness, needs a :return:","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"40332089d95c4b7aae68a7da7d125438099daec1","unresolved":false,"context_lines":[{"line_number":686,"context_line":"        :raises UnexpectedResponse: Exception raised when requests fail"},{"line_number":687,"context_line":"                                    to get a response with an acceptable status"},{"line_number":688,"context_line":"        :raises Exception: Exception is raised when code fails in an"},{"line_number":689,"context_line":"                           unexpected way."},{"line_number":690,"context_line":"        \"\"\""},{"line_number":691,"context_line":"        for item in self._iter_shard_ranges("},{"line_number":692,"context_line":"                account\u003daccount, container\u003dcontainer, marker\u003dmarker,"}],"source_content_type":"text/x-python","patch_set":10,"id":"d1985dfb_d40586f1","line":689,"in_reply_to":"b37c2c67_6285df04","updated":"2023-07-03 09:08:39.000000000","message":"Done","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4976666c431ddbae7c9aae55dbb547e364a72b27","unresolved":true,"context_lines":[{"line_number":694,"context_line":"                newest\u003dFalse, include_deleted\u003dinclude_deleted,"},{"line_number":695,"context_line":"                override_delete\u003doverride_deleted, params\u003dparams,"},{"line_number":696,"context_line":"                acceptable_statuses\u003dacceptable_statuses):"},{"line_number":697,"context_line":"            yield dict(Namespace.from_dict(item))"},{"line_number":698,"context_line":""},{"line_number":699,"context_line":"    def _iter_shard_ranges("},{"line_number":700,"context_line":"            self, account, container, marker\u003d\u0027\u0027, end_marker\u003d\u0027\u0027, includes\u003dNone,"}],"source_content_type":"text/x-python","patch_set":10,"id":"204b7087_91365e5b","line":697,"updated":"2023-06-27 14:18:15.000000000","message":"I think I\u0027d be happy for this methods to return Namespace instances, especially since we\u0027ve gone to the trouble of creating them.\n\nI realise that other iter_* methods return dicts, but there isn\u0027t a corresponding class to return for objects and containers.","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"40332089d95c4b7aae68a7da7d125438099daec1","unresolved":false,"context_lines":[{"line_number":694,"context_line":"                newest\u003dFalse, include_deleted\u003dinclude_deleted,"},{"line_number":695,"context_line":"                override_delete\u003doverride_deleted, params\u003dparams,"},{"line_number":696,"context_line":"                acceptable_statuses\u003dacceptable_statuses):"},{"line_number":697,"context_line":"            yield dict(Namespace.from_dict(item))"},{"line_number":698,"context_line":""},{"line_number":699,"context_line":"    def _iter_shard_ranges("},{"line_number":700,"context_line":"            self, account, container, marker\u003d\u0027\u0027, end_marker\u003d\u0027\u0027, includes\u003dNone,"}],"source_content_type":"text/x-python","patch_set":10,"id":"f57df160_2fb52156","line":697,"in_reply_to":"204b7087_91365e5b","updated":"2023-07-03 09:08:39.000000000","message":"yeah, great point. We\u0027re calling iter_shard_ranges and iter_namespaces, not iter_namespace_dicts.","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4976666c431ddbae7c9aae55dbb547e364a72b27","unresolved":true,"context_lines":[{"line_number":696,"context_line":"                acceptable_statuses\u003dacceptable_statuses):"},{"line_number":697,"context_line":"            yield dict(Namespace.from_dict(item))"},{"line_number":698,"context_line":""},{"line_number":699,"context_line":"    def _iter_shard_ranges("},{"line_number":700,"context_line":"            self, account, container, marker\u003d\u0027\u0027, end_marker\u003d\u0027\u0027, includes\u003dNone,"},{"line_number":701,"context_line":"            states\u003d[], newest\u003dFalse, include_deleted\u003dFalse,"},{"line_number":702,"context_line":"            override_deleted\u003dFalse, params\u003dNone,"}],"source_content_type":"text/x-python","patch_set":10,"id":"75322104_45660ced","line":699,"updated":"2023-06-27 14:18:15.000000000","message":"I\u0027d prefer to have this implementation method before the other two (\"define it before you use it\")","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"40332089d95c4b7aae68a7da7d125438099daec1","unresolved":false,"context_lines":[{"line_number":696,"context_line":"                acceptable_statuses\u003dacceptable_statuses):"},{"line_number":697,"context_line":"            yield dict(Namespace.from_dict(item))"},{"line_number":698,"context_line":""},{"line_number":699,"context_line":"    def _iter_shard_ranges("},{"line_number":700,"context_line":"            self, account, container, marker\u003d\u0027\u0027, end_marker\u003d\u0027\u0027, includes\u003dNone,"},{"line_number":701,"context_line":"            states\u003d[], newest\u003dFalse, include_deleted\u003dFalse,"},{"line_number":702,"context_line":"            override_deleted\u003dFalse, params\u003dNone,"}],"source_content_type":"text/x-python","patch_set":10,"id":"4b3f32aa_f941e5fc","line":699,"in_reply_to":"75322104_45660ced","updated":"2023-07-03 09:08:39.000000000","message":"Done","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4976666c431ddbae7c9aae55dbb547e364a72b27","unresolved":true,"context_lines":[{"line_number":698,"context_line":""},{"line_number":699,"context_line":"    def _iter_shard_ranges("},{"line_number":700,"context_line":"            self, account, container, marker\u003d\u0027\u0027, end_marker\u003d\u0027\u0027, includes\u003dNone,"},{"line_number":701,"context_line":"            states\u003d[], newest\u003dFalse, include_deleted\u003dFalse,"},{"line_number":702,"context_line":"            override_deleted\u003dFalse, params\u003dNone,"},{"line_number":703,"context_line":"            acceptable_statuses\u003d(2, HTTP_NOT_FOUND)):"},{"line_number":704,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"0a517e8a_51e4f208","line":701,"range":{"start_line":701,"start_character":12,"end_line":701,"end_character":21},"updated":"2023-06-27 14:18:15.000000000","message":"possibly ok here but not a good practice to use a mutable default https://docs.python-guide.org/writing/gotchas/#mutable-default-arguments\n\nuse `states\u003dNone`\n\nand then `states \u003d states or []`","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"40332089d95c4b7aae68a7da7d125438099daec1","unresolved":false,"context_lines":[{"line_number":698,"context_line":""},{"line_number":699,"context_line":"    def _iter_shard_ranges("},{"line_number":700,"context_line":"            self, account, container, marker\u003d\u0027\u0027, end_marker\u003d\u0027\u0027, includes\u003dNone,"},{"line_number":701,"context_line":"            states\u003d[], newest\u003dFalse, include_deleted\u003dFalse,"},{"line_number":702,"context_line":"            override_deleted\u003dFalse, params\u003dNone,"},{"line_number":703,"context_line":"            acceptable_statuses\u003d(2, HTTP_NOT_FOUND)):"},{"line_number":704,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"7c14fc28_60f12689","line":701,"range":{"start_line":701,"start_character":12,"end_line":701,"end_character":21},"in_reply_to":"0a517e8a_51e4f208","updated":"2023-07-03 09:08:39.000000000","message":"Done","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4976666c431ddbae7c9aae55dbb547e364a72b27","unresolved":true,"context_lines":[{"line_number":729,"context_line":"        :raises UnexpectedResponse: Exception raised when requests fail"},{"line_number":730,"context_line":"                                    to get a response with an acceptable status"},{"line_number":731,"context_line":"        :raises Exception: Exception is raised when code fails in an"},{"line_number":732,"context_line":"                           unexpected way."},{"line_number":733,"context_line":"        \"\"\""},{"line_number":734,"context_line":""},{"line_number":735,"context_line":"        path \u003d self.make_path(account, container)"}],"source_content_type":"text/x-python","patch_set":10,"id":"0c8ec7af_6e499f5c","line":732,"updated":"2023-06-27 14:18:15.000000000","message":"for completeness, needs a :return:","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"40332089d95c4b7aae68a7da7d125438099daec1","unresolved":false,"context_lines":[{"line_number":729,"context_line":"        :raises UnexpectedResponse: Exception raised when requests fail"},{"line_number":730,"context_line":"                                    to get a response with an acceptable status"},{"line_number":731,"context_line":"        :raises Exception: Exception is raised when code fails in an"},{"line_number":732,"context_line":"                           unexpected way."},{"line_number":733,"context_line":"        \"\"\""},{"line_number":734,"context_line":""},{"line_number":735,"context_line":"        path \u003d self.make_path(account, container)"}],"source_content_type":"text/x-python","patch_set":10,"id":"831c9ecc_1988abf9","line":732,"in_reply_to":"0c8ec7af_6e499f5c","updated":"2023-07-03 09:08:39.000000000","message":"Done","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2cfb9c6e3a5603451d104ab0a2647d69299f6604","unresolved":true,"context_lines":[{"line_number":763,"context_line":"                newest\u003dFalse, include_deleted\u003dinclude_deleted,"},{"line_number":764,"context_line":"                override_deleted\u003doverride_deleted, params\u003dparams,"},{"line_number":765,"context_line":"                acceptable_statuses\u003dacceptable_statuses):"},{"line_number":766,"context_line":"            yield Namespace.from_dict(item)"},{"line_number":767,"context_line":""},{"line_number":768,"context_line":"    def iter_objects("},{"line_number":769,"context_line":"            self, account, container, marker\u003d\u0027\u0027, end_marker\u003d\u0027\u0027, prefix\u003d\u0027\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"ec20b703_0b18288b","line":766,"updated":"2023-07-06 19:39:17.000000000","message":"i don\u0027t understand - it doesn\u0027t look like this ever goes to memcache?","commit_id":"740359f2e5474578d74d5bf2c68faffe97f0ea52"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"6ef59eb22067919e2118e18ef185654d0fed36b2","unresolved":false,"context_lines":[{"line_number":763,"context_line":"                newest\u003dFalse, include_deleted\u003dinclude_deleted,"},{"line_number":764,"context_line":"                override_deleted\u003doverride_deleted, params\u003dparams,"},{"line_number":765,"context_line":"                acceptable_statuses\u003dacceptable_statuses):"},{"line_number":766,"context_line":"            yield Namespace.from_dict(item)"},{"line_number":767,"context_line":""},{"line_number":768,"context_line":"    def iter_objects("},{"line_number":769,"context_line":"            self, account, container, marker\u003d\u0027\u0027, end_marker\u003d\u0027\u0027, prefix\u003d\u0027\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"3b807a80_316b9009","line":766,"in_reply_to":"ec20b703_0b18288b","updated":"2024-02-12 06:23:40.000000000","message":"never does anymore.","commit_id":"740359f2e5474578d74d5bf2c68faffe97f0ea52"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"e63c5d8763b94f88480d2e37de031a08ab6f39b7","unresolved":true,"context_lines":[{"line_number":785,"context_line":"                acceptable_statuses\u003dacceptable_statuses):"},{"line_number":786,"context_line":"            yield Namespace.from_dict(item)"},{"line_number":787,"context_line":""},{"line_number":788,"context_line":"    def iter_namespaces_from_cache(self, account, container, state\u003d\u0027listing\u0027,"},{"line_number":789,"context_line":"                                   includes\u003dNone):"},{"line_number":790,"context_line":"        \"\"\""},{"line_number":791,"context_line":"        Returns an iterator of :class:`~swift.common.utils.Namespace`"}],"source_content_type":"text/x-python","patch_set":14,"id":"3dbb50ef_8febf9b9","line":788,"updated":"2024-02-13 05:37:07.000000000","message":"okay, this function will get the memcache handle and use it to talk to memcached cluster directly to get namespace tuples.","commit_id":"f0572c58a5bc32d9ab225254551e238e6a9e14dc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a99c0cc6a4bfe5e3e943db3077e745331613f5ab","unresolved":true,"context_lines":[{"line_number":818,"context_line":"        if ns_bounds_list:"},{"line_number":819,"context_line":"            for ns in ns_bounds_list.get_namespaces():"},{"line_number":820,"context_line":"                if not includes or includes in ns:"},{"line_number":821,"context_line":"                    yield ns"},{"line_number":822,"context_line":""},{"line_number":823,"context_line":"    def iter_objects("},{"line_number":824,"context_line":"            self, account, container, marker\u003d\u0027\u0027, end_marker\u003d\u0027\u0027, prefix\u003d\u0027\u0027,"}],"source_content_type":"text/x-python","patch_set":14,"id":"46fc3a5e_a93ee882","line":821,"updated":"2024-02-15 13:22:58.000000000","message":"I\u0027m not sure this belongs in InternalClient. The downstream use case I am aware of that wants shard info from memcache could make use of ``swift.proxy.controllers.base.get_namespaces_from_cache`` https://github.com/openstack/swift/blob/0cb02a6ce5ddcd8615799072fd7b98b3db076313/swift/proxy/controllers/base.py#L892-L934 . That use case also looks in memcache for container_info, so my fear is that we start a slippery slope here towards also spoofing HEADs that are served from memcache.\n\nI also fear that this enshrines NamespaceBoundList as an external interface data type: what if we change the proxy internal namespace caching and can\u0027t easily return NamespaceBoundList? OK, I admit that\u0027s a stretch to imagine because it\u0027s already pretty stripped down data type, but in principle, do we want *InternalClient* , which is used in a lot of places, to suggest that proxy internal namespaces is now a supported API data type?","commit_id":"f0572c58a5bc32d9ab225254551e238e6a9e14dc"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"7f485576d506f7ce74a29c9f2766b03e8f84d0c0","unresolved":true,"context_lines":[{"line_number":818,"context_line":"        if ns_bounds_list:"},{"line_number":819,"context_line":"            for ns in ns_bounds_list.get_namespaces():"},{"line_number":820,"context_line":"                if not includes or includes in ns:"},{"line_number":821,"context_line":"                    yield ns"},{"line_number":822,"context_line":""},{"line_number":823,"context_line":"    def iter_objects("},{"line_number":824,"context_line":"            self, account, container, marker\u003d\u0027\u0027, end_marker\u003d\u0027\u0027, prefix\u003d\u0027\u0027,"}],"source_content_type":"text/x-python","patch_set":14,"id":"89936a6f_76b58a2b","line":821,"in_reply_to":"46fc3a5e_a93ee882","updated":"2024-02-16 03:41:46.000000000","message":"Well it enshrines an interface in internalclient that can return Namespace objects from memcache. If we ever did change NamespaceBoundsList then we\u0027d need to adjust accordingly here to return Namespace objects.\n\nI guess something like the object updater, whom I do want to use this interface could just look to something more internal. But I thought the point was to have a single place things outside the proxy can use to pull data so we can make changes internally and not worry about break unexpected things.\n\nIf we think namespaces are not a supported API datatype and we want to keep that internal.. yeah I see your point there. I could split this patch to only add the inter_shard_ranges and update the sharder to use it.\nHowever, one thing that seems to be clear from the namespace-ification of the proxy, almost everything (outside of the sharder) seems to only ever need the namespace data so they can find the right container \"shard\" to interact with. So having a Namespace interface does kinda make sense.","commit_id":"f0572c58a5bc32d9ab225254551e238e6a9e14dc"}],"swift/common/utils/__init__.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4976666c431ddbae7c9aae55dbb547e364a72b27","unresolved":true,"context_lines":[{"line_number":4534,"context_line":"        \"\"\""},{"line_number":4535,"context_line":"        if not dict_data.get(\u0027name\u0027) or dict_data.get(\u0027lower\u0027) is None \\"},{"line_number":4536,"context_line":"                or dict_data.get(\u0027upper\u0027) is None:"},{"line_number":4537,"context_line":"            raise ValueError(\"Missing expected Namespace values\")"},{"line_number":4538,"context_line":"        return Namespace(dict_data[\u0027name\u0027], dict_data[\u0027lower\u0027],"},{"line_number":4539,"context_line":"                         dict_data[\u0027upper\u0027])"},{"line_number":4540,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1b8b56c6_893b6d6c","line":4537,"updated":"2023-06-27 14:18:15.000000000","message":"ShardRange will raise a KeyError if any of the expected keys are missing - see ShardRange.from_dict() - it might be useful to follow the same pattern here (it also simplifies the method)","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"40332089d95c4b7aae68a7da7d125438099daec1","unresolved":false,"context_lines":[{"line_number":4534,"context_line":"        \"\"\""},{"line_number":4535,"context_line":"        if not dict_data.get(\u0027name\u0027) or dict_data.get(\u0027lower\u0027) is None \\"},{"line_number":4536,"context_line":"                or dict_data.get(\u0027upper\u0027) is None:"},{"line_number":4537,"context_line":"            raise ValueError(\"Missing expected Namespace values\")"},{"line_number":4538,"context_line":"        return Namespace(dict_data[\u0027name\u0027], dict_data[\u0027lower\u0027],"},{"line_number":4539,"context_line":"                         dict_data[\u0027upper\u0027])"},{"line_number":4540,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"4cfad922_cc6ed5d4","line":4537,"in_reply_to":"1b8b56c6_893b6d6c","updated":"2023-07-03 09:08:39.000000000","message":"good call","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"}],"swift/container/sharder.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1a4a441c649893209ab6bab629a39ba565921618","unresolved":true,"context_lines":[{"line_number":1170,"context_line":"        record_type \u003d resp.headers.get(\u0027x-backend-record-type\u0027)"},{"line_number":1171,"context_line":"        if record_type !\u003d \u0027shard\u0027:"},{"line_number":1172,"context_line":"            err \u003d \u0027unexpected record type %r\u0027 % record_type"},{"line_number":1173,"context_line":"            self.error(broker, \"Failed to get shard ranges from %s: %s\","},{"line_number":1174,"context_line":"                               quote(broker.root_path), err)"},{"line_number":1175,"context_line":"            return None"},{"line_number":1176,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"83d939c9_09dee6a1","side":"PARENT","line":1173,"range":{"start_line":1173,"start_character":12,"end_line":1173,"end_character":22},"updated":"2023-04-14 10:24:12.000000000","message":"this error level log has been downgraded to a warning - maybe iter_shard_ranges should raise ValueError when the received resp body is bad?","commit_id":"72386170d94b036117d52745a172653b27e055b7"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"9e9a7961343b9269661f34de52bedd54c55c03f6","unresolved":true,"context_lines":[{"line_number":1170,"context_line":"        record_type \u003d resp.headers.get(\u0027x-backend-record-type\u0027)"},{"line_number":1171,"context_line":"        if record_type !\u003d \u0027shard\u0027:"},{"line_number":1172,"context_line":"            err \u003d \u0027unexpected record type %r\u0027 % record_type"},{"line_number":1173,"context_line":"            self.error(broker, \"Failed to get shard ranges from %s: %s\","},{"line_number":1174,"context_line":"                               quote(broker.root_path), err)"},{"line_number":1175,"context_line":"            return None"},{"line_number":1176,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba4fb075_c6ed990e","side":"PARENT","line":1173,"range":{"start_line":1173,"start_character":12,"end_line":1173,"end_character":22},"in_reply_to":"5a4dc9f8_fc5692a9","updated":"2023-04-21 14:07:35.000000000","message":"I\u0027m even wondering if we need a new InternalClient exception (BadResponse?) that is used when the response does not conform to the API (which would be the case if we did not get back record_type \u003d\u003d shard).","commit_id":"72386170d94b036117d52745a172653b27e055b7"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"b04101c7cf104ad5d3037d22afd37628bd00986f","unresolved":true,"context_lines":[{"line_number":1170,"context_line":"        record_type \u003d resp.headers.get(\u0027x-backend-record-type\u0027)"},{"line_number":1171,"context_line":"        if record_type !\u003d \u0027shard\u0027:"},{"line_number":1172,"context_line":"            err \u003d \u0027unexpected record type %r\u0027 % record_type"},{"line_number":1173,"context_line":"            self.error(broker, \"Failed to get shard ranges from %s: %s\","},{"line_number":1174,"context_line":"                               quote(broker.root_path), err)"},{"line_number":1175,"context_line":"            return None"},{"line_number":1176,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5a4dc9f8_fc5692a9","side":"PARENT","line":1173,"range":{"start_line":1173,"start_character":12,"end_line":1173,"end_character":22},"in_reply_to":"83d939c9_09dee6a1","updated":"2023-04-19 06:43:03.000000000","message":"yeah, it seems I did just overload and rely on UnexpectedResponse for everything. The wrong record type means we have the wrong data. So maybe a value error is better.","commit_id":"72386170d94b036117d52745a172653b27e055b7"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1a4a441c649893209ab6bab629a39ba565921618","unresolved":true,"context_lines":[{"line_number":1165,"context_line":"        except internal_client.UnexpectedResponse as err:"},{"line_number":1166,"context_line":"            self.warning(broker, \"Failed to get shard ranges from %s: %s\","},{"line_number":1167,"context_line":"                         quote(broker.root_path), err)"},{"line_number":1168,"context_line":"        except (ValueError, TypeError, KeyError) as err:"},{"line_number":1169,"context_line":"            self.error(broker,"},{"line_number":1170,"context_line":"                       \"Failed to get shard ranges from %s: invalid data: %r\","},{"line_number":1171,"context_line":"                       quote(broker.root_path), err)"}],"source_content_type":"text/x-python","patch_set":6,"id":"a8b60133_328be5ab","line":1168,"range":{"start_line":1168,"start_character":15,"end_line":1168,"end_character":48},"updated":"2023-04-14 10:24:12.000000000","message":"I don\u0027t think these get raised from iter_shard_ranges, but maybe they should?","commit_id":"e095c377ccf9a2536075259d5941bc2bdedc053f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"f8f5afcc44237e173c663958fada174a2c36f5d1","unresolved":false,"context_lines":[{"line_number":1165,"context_line":"        except internal_client.UnexpectedResponse as err:"},{"line_number":1166,"context_line":"            self.warning(broker, \"Failed to get shard ranges from %s: %s\","},{"line_number":1167,"context_line":"                         quote(broker.root_path), err)"},{"line_number":1168,"context_line":"        except (ValueError, TypeError, KeyError) as err:"},{"line_number":1169,"context_line":"            self.error(broker,"},{"line_number":1170,"context_line":"                       \"Failed to get shard ranges from %s: invalid data: %r\","},{"line_number":1171,"context_line":"                       quote(broker.root_path), err)"}],"source_content_type":"text/x-python","patch_set":6,"id":"35b0c666_122029a1","line":1168,"range":{"start_line":1168,"start_character":15,"end_line":1168,"end_character":48},"in_reply_to":"327b7cb6_7ccca211","updated":"2023-04-26 01:56:40.000000000","message":"Done","commit_id":"e095c377ccf9a2536075259d5941bc2bdedc053f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"723da590c24807b68a039b3db384339be896b772","unresolved":true,"context_lines":[{"line_number":1165,"context_line":"        except internal_client.UnexpectedResponse as err:"},{"line_number":1166,"context_line":"            self.warning(broker, \"Failed to get shard ranges from %s: %s\","},{"line_number":1167,"context_line":"                         quote(broker.root_path), err)"},{"line_number":1168,"context_line":"        except (ValueError, TypeError, KeyError) as err:"},{"line_number":1169,"context_line":"            self.error(broker,"},{"line_number":1170,"context_line":"                       \"Failed to get shard ranges from %s: invalid data: %r\","},{"line_number":1171,"context_line":"                       quote(broker.root_path), err)"}],"source_content_type":"text/x-python","patch_set":6,"id":"327b7cb6_7ccca211","line":1168,"range":{"start_line":1168,"start_character":15,"end_line":1168,"end_character":48},"in_reply_to":"6be5cc40_eb29f90e","updated":"2023-04-24 11:01:36.000000000","message":"We discussed this and concluded that this except clause should not catch Exception, because that is what the InternalClient docstring says it may raise.\n\nBeing specific about TypeError, KeyError implies that the caller knows detail about the InternalClient implementation (json load etc).","commit_id":"e095c377ccf9a2536075259d5941bc2bdedc053f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"b04101c7cf104ad5d3037d22afd37628bd00986f","unresolved":true,"context_lines":[{"line_number":1165,"context_line":"        except internal_client.UnexpectedResponse as err:"},{"line_number":1166,"context_line":"            self.warning(broker, \"Failed to get shard ranges from %s: %s\","},{"line_number":1167,"context_line":"                         quote(broker.root_path), err)"},{"line_number":1168,"context_line":"        except (ValueError, TypeError, KeyError) as err:"},{"line_number":1169,"context_line":"            self.error(broker,"},{"line_number":1170,"context_line":"                       \"Failed to get shard ranges from %s: invalid data: %r\","},{"line_number":1171,"context_line":"                       quote(broker.root_path), err)"}],"source_content_type":"text/x-python","patch_set":6,"id":"c029b4dd_99de04f3","line":1168,"range":{"start_line":1168,"start_character":15,"end_line":1168,"end_character":48},"in_reply_to":"a8b60133_328be5ab","updated":"2023-04-19 06:43:03.000000000","message":"true, I seem to be catching these and then returning an UxexpectedResponse.. so ether this isn\u0027t required and I better sift and return the unexpected reposnse message or just pass on and reraise.\nHere in the sharder, it\u0027s ok becuase we are capturing these.. but the question is, what is the correct for an interface. Do we expect Value,Type and Key errors to fall out, or should an internal client interface only requrn UnexpectedResponse errors (or maybe something else).\n\nI\u0027ll sleep on it, and push up a new version of this patch in the morning.","commit_id":"e095c377ccf9a2536075259d5941bc2bdedc053f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"9e9a7961343b9269661f34de52bedd54c55c03f6","unresolved":true,"context_lines":[{"line_number":1165,"context_line":"        except internal_client.UnexpectedResponse as err:"},{"line_number":1166,"context_line":"            self.warning(broker, \"Failed to get shard ranges from %s: %s\","},{"line_number":1167,"context_line":"                         quote(broker.root_path), err)"},{"line_number":1168,"context_line":"        except (ValueError, TypeError, KeyError) as err:"},{"line_number":1169,"context_line":"            self.error(broker,"},{"line_number":1170,"context_line":"                       \"Failed to get shard ranges from %s: invalid data: %r\","},{"line_number":1171,"context_line":"                       quote(broker.root_path), err)"}],"source_content_type":"text/x-python","patch_set":6,"id":"6be5cc40_eb29f90e","line":1168,"range":{"start_line":1168,"start_character":15,"end_line":1168,"end_character":48},"in_reply_to":"c029b4dd_99de04f3","updated":"2023-04-21 14:07:35.000000000","message":"good point, maybe it is better if these decoding errors are handled in the internal client...\n\nBUT, looking more at other iter methods, the internal client does a json.loads with no try/except, so any bad response body for an object listing or container listing is NOT handled by the internal client - I guess it is assumed that the API would not return bad format body (which is somewhat reasonable).\n\nI wonder if we have ever seen \"Failed to get shard ranges from %s: invalid data: %r\" in prod, or if this error handling is way too paranoid??","commit_id":"e095c377ccf9a2536075259d5941bc2bdedc053f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ca50541e1cf7694b24a814b71b07f868a7c75084","unresolved":true,"context_lines":[{"line_number":1149,"context_line":"                \u0027Skipping %(device)s as it is not mounted\u0027 % node)"},{"line_number":1150,"context_line":"            return False"},{"line_number":1151,"context_line":""},{"line_number":1152,"context_line":"    def _fetch_shard_ranges(self, broker, newest\u003dFalse, marker\u003d\u0027\u0027,"},{"line_number":1153,"context_line":"                            end_marker\u003d\u0027\u0027, states\u003dNone, includes\u003dNone,"},{"line_number":1154,"context_line":"                            include_deleted\u003dFalse):"},{"line_number":1155,"context_line":"        if states and not isinstance(states, (list, tuple)):"}],"source_content_type":"text/x-python","patch_set":9,"id":"af3f9d5e_cbf35c68","line":1152,"range":{"start_line":1152,"start_character":42,"end_line":1152,"end_character":54},"updated":"2023-05-08 20:02:02.000000000","message":"Side note: it\u0027s strange that we default this to `False` when the only two callers I can find set it to `True` :-/\n\nLooks like it goes back to the original commit: https://github.com/openstack/swift/commit/2641814 Maybe we thought we\u0027d find other uses?","commit_id":"46ffe6c73fc0b1e9f1001f1288823a0365ce13f1"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4976666c431ddbae7c9aae55dbb547e364a72b27","unresolved":true,"context_lines":[{"line_number":1149,"context_line":"                \u0027Skipping %(device)s as it is not mounted\u0027 % node)"},{"line_number":1150,"context_line":"            return False"},{"line_number":1151,"context_line":""},{"line_number":1152,"context_line":"    def _fetch_shard_ranges(self, broker, newest\u003dFalse, marker\u003d\u0027\u0027,"},{"line_number":1153,"context_line":"                            end_marker\u003d\u0027\u0027, states\u003dNone, includes\u003dNone,"},{"line_number":1154,"context_line":"                            include_deleted\u003dFalse):"},{"line_number":1155,"context_line":"        if states and not isinstance(states, (list, tuple)):"}],"source_content_type":"text/x-python","patch_set":9,"id":"f59cd81d_893bb29e","line":1152,"range":{"start_line":1152,"start_character":42,"end_line":1152,"end_character":54},"in_reply_to":"050266ab_4a21d436","updated":"2023-06-27 14:18:15.000000000","message":"I\u0027d say get rid of newest arg but add a comment to highlight that this deliberately uses the expensive iter method","commit_id":"46ffe6c73fc0b1e9f1001f1288823a0365ce13f1"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"667b1e139ce71ac1cf9f384e893e847cd5d8a7a5","unresolved":true,"context_lines":[{"line_number":1149,"context_line":"                \u0027Skipping %(device)s as it is not mounted\u0027 % node)"},{"line_number":1150,"context_line":"            return False"},{"line_number":1151,"context_line":""},{"line_number":1152,"context_line":"    def _fetch_shard_ranges(self, broker, newest\u003dFalse, marker\u003d\u0027\u0027,"},{"line_number":1153,"context_line":"                            end_marker\u003d\u0027\u0027, states\u003dNone, includes\u003dNone,"},{"line_number":1154,"context_line":"                            include_deleted\u003dFalse):"},{"line_number":1155,"context_line":"        if states and not isinstance(states, (list, tuple)):"}],"source_content_type":"text/x-python","patch_set":9,"id":"050266ab_4a21d436","line":1152,"range":{"start_line":1152,"start_character":42,"end_line":1152,"end_character":54},"in_reply_to":"af3f9d5e_cbf35c68","updated":"2023-05-09 06:26:41.000000000","message":"Yeah, I think my thinking was when you run with newest\u003dTrue, you are forcing the cluster to make a request to all primaries, comparing and returning the newest.. this seemed like an expensive operation that would be better to opt into. Ie newest\u003dfalse wouldn\u0027t do this.. although if all we use is newest\u003dtrue then maybe we should change the default?","commit_id":"46ffe6c73fc0b1e9f1001f1288823a0365ce13f1"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"40332089d95c4b7aae68a7da7d125438099daec1","unresolved":false,"context_lines":[{"line_number":1149,"context_line":"                \u0027Skipping %(device)s as it is not mounted\u0027 % node)"},{"line_number":1150,"context_line":"            return False"},{"line_number":1151,"context_line":""},{"line_number":1152,"context_line":"    def _fetch_shard_ranges(self, broker, newest\u003dFalse, marker\u003d\u0027\u0027,"},{"line_number":1153,"context_line":"                            end_marker\u003d\u0027\u0027, states\u003dNone, includes\u003dNone,"},{"line_number":1154,"context_line":"                            include_deleted\u003dFalse):"},{"line_number":1155,"context_line":"        if states and not isinstance(states, (list, tuple)):"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fe51c5e_812dde43","line":1152,"range":{"start_line":1152,"start_character":42,"end_line":1152,"end_character":54},"in_reply_to":"f59cd81d_893bb29e","updated":"2023-07-03 09:08:39.000000000","message":"Done","commit_id":"46ffe6c73fc0b1e9f1001f1288823a0365ce13f1"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ca50541e1cf7694b24a814b71b07f868a7c75084","unresolved":true,"context_lines":[{"line_number":1150,"context_line":"            return False"},{"line_number":1151,"context_line":""},{"line_number":1152,"context_line":"    def _fetch_shard_ranges(self, broker, newest\u003dFalse, marker\u003d\u0027\u0027,"},{"line_number":1153,"context_line":"                            end_marker\u003d\u0027\u0027, states\u003dNone, includes\u003dNone,"},{"line_number":1154,"context_line":"                            include_deleted\u003dFalse):"},{"line_number":1155,"context_line":"        if states and not isinstance(states, (list, tuple)):"},{"line_number":1156,"context_line":"            states \u003d [states]"},{"line_number":1157,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"d38e6d8c_6de4121d","line":1154,"range":{"start_line":1153,"start_character":56,"end_line":1154,"end_character":49},"updated":"2023-05-08 20:02:02.000000000","message":"Does anything use these?","commit_id":"46ffe6c73fc0b1e9f1001f1288823a0365ce13f1"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"667b1e139ce71ac1cf9f384e893e847cd5d8a7a5","unresolved":true,"context_lines":[{"line_number":1150,"context_line":"            return False"},{"line_number":1151,"context_line":""},{"line_number":1152,"context_line":"    def _fetch_shard_ranges(self, broker, newest\u003dFalse, marker\u003d\u0027\u0027,"},{"line_number":1153,"context_line":"                            end_marker\u003d\u0027\u0027, states\u003dNone, includes\u003dNone,"},{"line_number":1154,"context_line":"                            include_deleted\u003dFalse):"},{"line_number":1155,"context_line":"        if states and not isinstance(states, (list, tuple)):"},{"line_number":1156,"context_line":"            states \u003d [states]"},{"line_number":1157,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"e9926c9f_37ece4b2","line":1154,"range":{"start_line":1153,"start_character":56,"end_line":1154,"end_character":49},"in_reply_to":"d38e6d8c_6de4121d","updated":"2023-05-09 06:26:41.000000000","message":"I\u0027ll have to confirm, but include_deleted should be used for audting shard containers. includes I guess would be used to find the shard an object belongs. It\u0027s an interface we support in the container server when dealing with shard ranges, so we only need to return the shard range an object belongs.\n\nThe sharder used to support it, indirectly, because you could pass in a dict of params, althuogh we don\u0027t actually seem to use it. So yeah maybe it isn\u0027t needed in the sharder.","commit_id":"46ffe6c73fc0b1e9f1001f1288823a0365ce13f1"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ca50541e1cf7694b24a814b71b07f868a7c75084","unresolved":true,"context_lines":[{"line_number":1489,"context_line":"        # the root range should be in sharded state and will not interfere"},{"line_number":1490,"context_line":"        # with cleaving, listing or updating behaviour."},{"line_number":1491,"context_line":"        shard_ranges \u003d self._fetch_shard_ranges("},{"line_number":1492,"context_line":"            broker, True, str_to_wsgi(own_shard_range.lower_str),"},{"line_number":1493,"context_line":"            str_to_wsgi(own_shard_range.upper_str), \u0027auditing\u0027,"},{"line_number":1494,"context_line":"            include_deleted\u003dTrue)"},{"line_number":1495,"context_line":"        if shard_ranges:"}],"source_content_type":"text/x-python","patch_set":9,"id":"d5b74e7b_b4674d14","line":1492,"range":{"start_line":1492,"start_character":20,"end_line":1492,"end_character":24},"updated":"2023-05-08 20:02:02.000000000","message":"I kinda preferred how explicit `newest\u003dTrue` was -- as it is, you have to look at the signature of `_fetch_shard_ranges` to understand what this arg does.\n\nOr we just drop the arg and always pass `newest\u003dTrue` in the helper.","commit_id":"46ffe6c73fc0b1e9f1001f1288823a0365ce13f1"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"667b1e139ce71ac1cf9f384e893e847cd5d8a7a5","unresolved":true,"context_lines":[{"line_number":1489,"context_line":"        # the root range should be in sharded state and will not interfere"},{"line_number":1490,"context_line":"        # with cleaving, listing or updating behaviour."},{"line_number":1491,"context_line":"        shard_ranges \u003d self._fetch_shard_ranges("},{"line_number":1492,"context_line":"            broker, True, str_to_wsgi(own_shard_range.lower_str),"},{"line_number":1493,"context_line":"            str_to_wsgi(own_shard_range.upper_str), \u0027auditing\u0027,"},{"line_number":1494,"context_line":"            include_deleted\u003dTrue)"},{"line_number":1495,"context_line":"        if shard_ranges:"}],"source_content_type":"text/x-python","patch_set":9,"id":"f3296446_428b5b9b","line":1492,"range":{"start_line":1492,"start_character":20,"end_line":1492,"end_character":24},"in_reply_to":"d5b74e7b_b4674d14","updated":"2023-05-09 06:26:41.000000000","message":"yup great point!","commit_id":"46ffe6c73fc0b1e9f1001f1288823a0365ce13f1"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"40332089d95c4b7aae68a7da7d125438099daec1","unresolved":false,"context_lines":[{"line_number":1489,"context_line":"        # the root range should be in sharded state and will not interfere"},{"line_number":1490,"context_line":"        # with cleaving, listing or updating behaviour."},{"line_number":1491,"context_line":"        shard_ranges \u003d self._fetch_shard_ranges("},{"line_number":1492,"context_line":"            broker, True, str_to_wsgi(own_shard_range.lower_str),"},{"line_number":1493,"context_line":"            str_to_wsgi(own_shard_range.upper_str), \u0027auditing\u0027,"},{"line_number":1494,"context_line":"            include_deleted\u003dTrue)"},{"line_number":1495,"context_line":"        if shard_ranges:"}],"source_content_type":"text/x-python","patch_set":9,"id":"36aecc10_addf4b2f","line":1492,"range":{"start_line":1492,"start_character":20,"end_line":1492,"end_character":24},"in_reply_to":"f3296446_428b5b9b","updated":"2023-07-03 09:08:39.000000000","message":"Done","commit_id":"46ffe6c73fc0b1e9f1001f1288823a0365ce13f1"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4976666c431ddbae7c9aae55dbb547e364a72b27","unresolved":true,"context_lines":[{"line_number":1153,"context_line":"                            end_marker\u003d\u0027\u0027, states\u003dNone, includes\u003dNone,"},{"line_number":1154,"context_line":"                            include_deleted\u003dFalse):"},{"line_number":1155,"context_line":"        if states and not isinstance(states, (list, tuple)):"},{"line_number":1156,"context_line":"            states \u003d [states]"},{"line_number":1157,"context_line":"        try:"},{"line_number":1158,"context_line":"            shard_ranges \u003d self.int_client.iter_shard_ranges("},{"line_number":1159,"context_line":"                broker.root_account, broker.root_container, marker,"}],"source_content_type":"text/x-python","patch_set":10,"id":"36da1185_755b5141","line":1156,"updated":"2023-06-27 14:18:15.000000000","message":"this seems like good defensive code that should belong in _iter_shard_ranges","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"40332089d95c4b7aae68a7da7d125438099daec1","unresolved":false,"context_lines":[{"line_number":1153,"context_line":"                            end_marker\u003d\u0027\u0027, states\u003dNone, includes\u003dNone,"},{"line_number":1154,"context_line":"                            include_deleted\u003dFalse):"},{"line_number":1155,"context_line":"        if states and not isinstance(states, (list, tuple)):"},{"line_number":1156,"context_line":"            states \u003d [states]"},{"line_number":1157,"context_line":"        try:"},{"line_number":1158,"context_line":"            shard_ranges \u003d self.int_client.iter_shard_ranges("},{"line_number":1159,"context_line":"                broker.root_account, broker.root_container, marker,"}],"source_content_type":"text/x-python","patch_set":10,"id":"f243a812_cedd383a","line":1156,"in_reply_to":"36da1185_755b5141","updated":"2023-07-03 09:08:39.000000000","message":"Done","commit_id":"726e879f95946e3bdedac254a8b6bbdb52348095"}],"test/unit/common/test_internal_client.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2cfb9c6e3a5603451d104ab0a2647d69299f6604","unresolved":true,"context_lines":[{"line_number":1623,"context_line":"            # Even though we are returning shard_range dicts they\u0027ll be"},{"line_number":1624,"context_line":"            # changed to namespace ones."},{"line_number":1625,"context_line":"            Response(200, json.dumps([dict(sr) for sr in shard_ranges])),"},{"line_number":1626,"context_line":"        ]"},{"line_number":1627,"context_line":""},{"line_number":1628,"context_line":"        items \u003d []"},{"line_number":1629,"context_line":"        client \u003d InternalClient(self, exp_headers, params_list, responses)"}],"source_content_type":"text/x-python","patch_set":11,"id":"01810dfa_5d31feff","line":1626,"updated":"2023-07-06 19:39:17.000000000","message":"this looks more like a backend sr response - so this is when the iter_namespaces intefaces is facing a cache miss then?","commit_id":"740359f2e5474578d74d5bf2c68faffe97f0ea52"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2cfb9c6e3a5603451d104ab0a2647d69299f6604","unresolved":true,"context_lines":[{"line_number":1636,"context_line":""},{"line_number":1637,"context_line":"        # Now let\u0027s add the extra options includes, states,"},{"line_number":1638,"context_line":"        # include_deleted, and override_deleted and make sure the params and"},{"line_number":1639,"context_line":"        # headers are added as expected."},{"line_number":1640,"context_line":"        exp_headers.update({"},{"line_number":1641,"context_line":"            \u0027X-Backend-Override-Deleted\u0027: \u0027True\u0027,"},{"line_number":1642,"context_line":"            \u0027X-Backend-Include-Deleted\u0027: \u0027True\u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"791b5167_63db5ae3","line":1639,"updated":"2023-07-06 19:39:17.000000000","message":"I don\u0027t think these options cache effectively be implemented if we expect to share cache with the proxy - these kinds of options would probably force a backend query and should probably only be exposed on the iter_shard_ranges interface","commit_id":"740359f2e5474578d74d5bf2c68faffe97f0ea52"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2cfb9c6e3a5603451d104ab0a2647d69299f6604","unresolved":true,"context_lines":[{"line_number":1669,"context_line":"                        override_deleted\u003dTrue):"},{"line_number":1670,"context_line":"                    pass"},{"line_number":1671,"context_line":"            self.assertIn(\u0027Wrong record type: %s\u0027 % record_type,"},{"line_number":1672,"context_line":"                          str(ur.exception))"},{"line_number":1673,"context_line":""},{"line_number":1674,"context_line":"    def test_iter_objects(self):"},{"line_number":1675,"context_line":"        account, container, obj \u003d path_parts()"}],"source_content_type":"text/x-python","patch_set":11,"id":"08d52621_27e6968c","line":1672,"updated":"2023-07-06 19:39:17.000000000","message":"i don\u0027t see anyhting in this test about the caching behavior of iter namesapces - which I through was the main point.\n\nWe want to hide the complexities of cache accelleration and sr bisection from consumers who need to find the target sr for a given a/c/o","commit_id":"740359f2e5474578d74d5bf2c68faffe97f0ea52"}]}
