)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d71caa35616ad67dcc2f653ccc97d03a5ced9526","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"e2275979_7c7afab3","updated":"2024-12-14 01:22:05.000000000","message":"Could use some tests -- though I\u0027m not sure how much to use the existing tests as a template.\n```\nE       AssertionError: \"Prox[308 chars]s\u0027: 0}, app)\" !\u003d \"Prox[308 chars]s\u0027: 0, \u0027request_node_count\u0027: \u003cfunction config_[64 chars]app)\"\nE       - ProxyOverrideOptions({}, {\u0027sorting_method\u0027: \u0027shuffle\u0027, \u0027read_affinity\u0027: \u0027\u0027, \u0027write_affinity\u0027: \u0027\u0027, \u0027write_affinity_node_count\u0027: \u00272 * replicas\u0027, \u0027write_affinity_handoff_delete_count\u0027: None, \u0027rebalance_missing_suppression_count\u0027: 1, \u0027concurrent_gets\u0027: False, \u0027concurrency_timeout\u0027: 0.5, \u0027concurrent_ec_extra_requests\u0027: 0}, app)\nE       + ProxyOverrideOptions({}, {\u0027sorting_method\u0027: \u0027shuffle\u0027, \u0027read_affinity\u0027: \u0027\u0027, \u0027write_affinity\u0027: \u0027\u0027, \u0027write_affinity_node_count\u0027: \u00272 * replicas\u0027, \u0027write_affinity_handoff_delete_count\u0027: None, \u0027rebalance_missing_suppression_count\u0027: 1, \u0027concurrent_gets\u0027: False, \u0027concurrency_timeout\u0027: 0.5, \u0027concurrent_ec_extra_requests\u0027: 0, \u0027request_node_count\u0027: \u003cfunction config_request_node_count_value.\u003clocals\u003e.\u003clambda\u003e at 0x7e3a5a0379c0\u003e}, app)\n```\nI don\u0027t particularly care for assertions on `repr`s when the `repr` needs to span 8 lines in tests.","commit_id":"758200067f8e6e0f2a6aa81bf24c872154c38b3f"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c16484f4e13bf0feabbf9d4866261a0441c03a7c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"48a18444_489a136d","updated":"2025-01-08 18:22:05.000000000","message":"I noticed that setting the value of request_node_count to something *less* than parity my proxy would always return 503:\n\n```\n2025-01-08T16:57:52.055937+00:00 demo-node-centos7-0 object-server: info 192.168.26.108 - - [08/Jan/2025:16:57:52 +0000] \"HEAD /d0/111/AUTH_dev/ectest/does-not-exist\" 404 - \"HEAD http://demo-storage.s8k.io/v1/AUTH_dev/ectest/does-not-exist\" \"tx43bf84560ca64c75bffcd-00677eae90\" \"proxy-server 1757\" 0.0006 \"-\" 4227 1\n2025-01-08T16:57:52.063819+00:00 demo-node-centos7-0 proxy-server: err Object HEAD returning 503 for [] (txn: tx43bf84560ca64c75bffcd-00677eae90) (client_ip: 192.168.19.108)\n2025-01-08T16:57:52.064140+00:00 demo-node-centos7-0 proxy-server: info 192.168.19.108 192.168.19.108 08/Jan/2025/16/57/52 HEAD /v1/AUTH_dev/ectest/does-not-exist HTTP/1.0 503 - python-swiftclient-4.6.0 dev%2CAUTH_tk209b2... - - - tx43bf84560ca64c75bffcd-00677eae90 - 0.0192 - - 1736355472.042777777 1736355472.062010050 1 - AUTH_dev ectest does-not-exist 503 1757\n```\n\nI think *maybe* what\u0027s going on is the waterfall-ec requests are digging into handoffs and primaries 404 w/o a timestamp are getting ignored?  With \u003e\u003d nparity it looks very normal/boring:\n\n```\n2025-01-08T16:59:10.005586+00:00 demo-node-centos7-0 proxy-server: info 192.168.19.108 192.168.19.108 08/Jan/2025/16/59/10 HEAD /v1/AUTH_dev/ectest/does-not-exist HTTP/1.0 404 - python-swiftclient-4.6.0 dev%2CAUTH_tk209b2... - - - txe1c9276a48c04ad1948ed-00677eaedd - 0.0437 - - 1736355549.959835529 1736355550.003545761 1 - AUTH_dev ectest does-not-exist 404 4900\n```\n\nAnyway, I think we should probably debug or add some validation to configuration or pass in the ring instead of replica or at least some docs about \"no less than parity\" or something else before we merge this.","commit_id":"6d94c098f9f50812f00c686ee9820c96c67c58c8"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"a3a40ad281f360e89e311321c56e5d0ac8756223","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"abc1a4f1_1330e1a3","updated":"2025-01-06 22:54:29.000000000","message":"So I\u0027m getting a little nervous about this as I dig into [the reconstructor code](https://github.com/openstack/swift/blob/2.34.0/swift/obj/reconstructor.py#L870-L872)... looks like we\u0027re happy to have the proxy drop frags onto the first available handoff, but if the primary continues to be unavailable, we may start moving things deeper into handoffs... so reducing `request_node_count` to anything less than `2 * replicas` may impact availability...\n\nOTOH, more knobs give ops more options... but I don\u0027t like the idea of handing them a foot-gun.","commit_id":"6d94c098f9f50812f00c686ee9820c96c67c58c8"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"3432abdb52435b9633b48bbf798e3c581b9c1679","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"49701a37_a2051b8f","updated":"2025-01-16 00:56:22.000000000","message":"The \"request_node_count \u003c ndata\" footgun already exists on master; but maybe it\u0027s more \"accessible\" with this change because there\u0027s so many conditions with EC where you might test some value and it seems to work but isn\u0027t really doing what you expect:\n\n939408: sq? moar tests for per-policy request_node_count | https://review.opendev.org/c/openstack/swift/+/939408\n\nAnyway, my biggest worry with merging this - as opposed to carrying it and playing with it in STG - isn\u0027t so against \"let\u0027s make another proxy option overrideable in per-policy\" as it is that we don\u0027t know if it actually helps with https://bugs.launchpad.net/swift/+bug/1663742 \"EC Object 404 is too slow\" (which should be the real motivation for investing time here).\n\nI don\u0027t think there\u0027s any inherit merit (or at least only marginal value) in making a knob that no one knows how to safely turn into 10 knobs no one knows how turn.","commit_id":"6d94c098f9f50812f00c686ee9820c96c67c58c8"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cc4afe271647b80fe1c224df4d8cfe7baabfa85c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"e51b2c3d_617affbc","updated":"2025-01-16 19:53:47.000000000","message":"What do we think about 939471: Limit node_iter on EC HEAD | https://review.opendev.org/c/openstack/swift/+/939471 instead as a more \"direct\" fix for https://bugs.launchpad.net/swift/+bug/1663742","commit_id":"6d94c098f9f50812f00c686ee9820c96c67c58c8"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"c430a559b09305c041c7d5d5a420977fb1e22a5f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"3c58f655_f9bd34f7","updated":"2025-01-14 06:07:34.000000000","message":"Yeah, this just set the number of nodes_left in the NodeIter, so it\u0027s the total number of nodes to check, not just the handoffs.\nworse it\u0027s the same for HEADs and GETs. Maybe we need to just change the EC HEAD obj controller path to default to replica or ndata or something. Because the default of `2 * replicas` for EC heads is NEVER the correct number. It\u0027s just too many.","commit_id":"6d94c098f9f50812f00c686ee9820c96c67c58c8"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"3a8bb715b1a3e1ac64b9130bec51475e9c277aa1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"b080f3e0_642fce63","updated":"2025-01-30 00:29:33.000000000","message":"Yup this does see to be more of a shoot yourself in the foot kind of thing. Are we still carrying this? I\u0027ll put a -2 on it for now. And when the other is fully ready I\u0027ll abandon this one.","commit_id":"6d94c098f9f50812f00c686ee9820c96c67c58c8"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"c430a559b09305c041c7d5d5a420977fb1e22a5f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"5288f8b4_e8954c71","in_reply_to":"48a18444_489a136d","updated":"2025-01-14 06:07:34.000000000","message":"hmm, I seem to be having trouble recreating this.. but that\u0027s probably me just missing something in my env. Will keep trying.","commit_id":"6d94c098f9f50812f00c686ee9820c96c67c58c8"}],"swift/proxy/controllers/base.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"3432abdb52435b9633b48bbf798e3c581b9c1679","unresolved":true,"context_lines":[{"line_number":1789,"context_line":""},{"line_number":1790,"context_line":"        req_node_count_fn \u003d self.app.request_node_count_fn"},{"line_number":1791,"context_line":"        if policy:"},{"line_number":1792,"context_line":"            policy_options \u003d self.app.get_policy_options(policy)"},{"line_number":1793,"context_line":"            req_node_count_fn \u003d policy_options.request_node_count_fn"},{"line_number":1794,"context_line":"        part_nodes \u003d ring.get_part_nodes(partition)"},{"line_number":1795,"context_line":"        if node_iter is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"f1bee43a_c2960827","line":1792,"updated":"2025-01-16 00:56:22.000000000","message":"I think you can call `self.app.get_policy_options(None)` and it gives you the proxy\u0027s default config.","commit_id":"6d94c098f9f50812f00c686ee9820c96c67c58c8"}],"swift/proxy/server.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d71caa35616ad67dcc2f653ccc97d03a5ced9526","unresolved":true,"context_lines":[{"line_number":139,"context_line":"        if len(value) \u003d\u003d 1:"},{"line_number":140,"context_line":"            wanc_value \u003d int(value[0])"},{"line_number":141,"context_line":"            self.write_affinity_node_count_fn \u003d lambda replicas: wanc_value"},{"line_number":142,"context_line":"        elif len(value) \u003d\u003d 3 and value[1] \u003d\u003d \u0027*\u0027 and value[2] \u003d\u003d \u0027replicas\u0027:"},{"line_number":143,"context_line":"            wanc_value \u003d int(value[0])"},{"line_number":144,"context_line":"            self.write_affinity_node_count_fn \u003d \\"},{"line_number":145,"context_line":"                lambda replicas: wanc_value * replicas"}],"source_content_type":"text/x-python","patch_set":1,"id":"f30d756a_9c084afe","line":142,"updated":"2024-12-14 01:22:05.000000000","message":"Off-topic: Huh. Why don\u0027t we use `config_request_node_count_value` here?","commit_id":"758200067f8e6e0f2a6aa81bf24c872154c38b3f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"5a3e91d9f205a48efb59f8f01493dfae14517a33","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        if len(value) \u003d\u003d 1:"},{"line_number":140,"context_line":"            wanc_value \u003d int(value[0])"},{"line_number":141,"context_line":"            self.write_affinity_node_count_fn \u003d lambda replicas: wanc_value"},{"line_number":142,"context_line":"        elif len(value) \u003d\u003d 3 and value[1] \u003d\u003d \u0027*\u0027 and value[2] \u003d\u003d \u0027replicas\u0027:"},{"line_number":143,"context_line":"            wanc_value \u003d int(value[0])"},{"line_number":144,"context_line":"            self.write_affinity_node_count_fn \u003d \\"},{"line_number":145,"context_line":"                lambda replicas: wanc_value * replicas"}],"source_content_type":"text/x-python","patch_set":1,"id":"042aa387_d64798e0","line":142,"in_reply_to":"6f08e76d_ff87e111","updated":"2024-12-16 06:35:28.000000000","message":"Done","commit_id":"758200067f8e6e0f2a6aa81bf24c872154c38b3f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"7c079d03c9419204b4d5e35ddb901a4af7336bf8","unresolved":true,"context_lines":[{"line_number":139,"context_line":"        if len(value) \u003d\u003d 1:"},{"line_number":140,"context_line":"            wanc_value \u003d int(value[0])"},{"line_number":141,"context_line":"            self.write_affinity_node_count_fn \u003d lambda replicas: wanc_value"},{"line_number":142,"context_line":"        elif len(value) \u003d\u003d 3 and value[1] \u003d\u003d \u0027*\u0027 and value[2] \u003d\u003d \u0027replicas\u0027:"},{"line_number":143,"context_line":"            wanc_value \u003d int(value[0])"},{"line_number":144,"context_line":"            self.write_affinity_node_count_fn \u003d \\"},{"line_number":145,"context_line":"                lambda replicas: wanc_value * replicas"}],"source_content_type":"text/x-python","patch_set":1,"id":"6f08e76d_ff87e111","line":142,"in_reply_to":"f30d756a_9c084afe","updated":"2024-12-16 06:30:07.000000000","message":"Yeah, no idea.. I\u0027ll sneakly make this change too ;)","commit_id":"758200067f8e6e0f2a6aa81bf24c872154c38b3f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d71caa35616ad67dcc2f653ccc97d03a5ced9526","unresolved":true,"context_lines":[{"line_number":160,"context_line":"        self.concurrent_ec_extra_requests \u003d int(get("},{"line_number":161,"context_line":"            \u0027concurrent_ec_extra_requests\u0027, 0))"},{"line_number":162,"context_line":"        value \u003d get(\u0027request_node_count\u0027, \u00272 * replicas\u0027)"},{"line_number":163,"context_line":"        self.request_node_count \u003d config_request_node_count_value(value)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def __repr__(self):"},{"line_number":166,"context_line":"        return \u0027%s({}, {%s}, app)\u0027 % ("}],"source_content_type":"text/x-python","patch_set":1,"id":"7c84bb96_9a6dfb60","line":163,"updated":"2024-12-14 01:22:05.000000000","message":"I think we might need to track both `request_node_count` (the string) and `request_node_count_fn` (the lambda), similar to what we do with `write_affinity_node_count`.","commit_id":"758200067f8e6e0f2a6aa81bf24c872154c38b3f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"5a3e91d9f205a48efb59f8f01493dfae14517a33","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        self.concurrent_ec_extra_requests \u003d int(get("},{"line_number":161,"context_line":"            \u0027concurrent_ec_extra_requests\u0027, 0))"},{"line_number":162,"context_line":"        value \u003d get(\u0027request_node_count\u0027, \u00272 * replicas\u0027)"},{"line_number":163,"context_line":"        self.request_node_count \u003d config_request_node_count_value(value)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def __repr__(self):"},{"line_number":166,"context_line":"        return \u0027%s({}, {%s}, app)\u0027 % ("}],"source_content_type":"text/x-python","patch_set":1,"id":"8e8319f9_e1dabe0f","line":163,"in_reply_to":"7c84bb96_9a6dfb60","updated":"2024-12-16 06:35:28.000000000","message":"Done","commit_id":"758200067f8e6e0f2a6aa81bf24c872154c38b3f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d71caa35616ad67dcc2f653ccc97d03a5ced9526","unresolved":true,"context_lines":[{"line_number":175,"context_line":"                    \u0027concurrent_gets\u0027,"},{"line_number":176,"context_line":"                    \u0027concurrency_timeout\u0027,"},{"line_number":177,"context_line":"                    \u0027concurrent_ec_extra_requests\u0027,"},{"line_number":178,"context_line":"                    \u0027request_node_count\u0027,"},{"line_number":179,"context_line":"                )))"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def __eq__(self, other):"}],"source_content_type":"text/x-python","patch_set":1,"id":"68ca29ea_7015a538","line":178,"updated":"2024-12-14 01:22:05.000000000","message":"...and then be sure to _not_ include `request_node_count_fn` here.","commit_id":"758200067f8e6e0f2a6aa81bf24c872154c38b3f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"7c079d03c9419204b4d5e35ddb901a4af7336bf8","unresolved":true,"context_lines":[{"line_number":175,"context_line":"                    \u0027concurrent_gets\u0027,"},{"line_number":176,"context_line":"                    \u0027concurrency_timeout\u0027,"},{"line_number":177,"context_line":"                    \u0027concurrent_ec_extra_requests\u0027,"},{"line_number":178,"context_line":"                    \u0027request_node_count\u0027,"},{"line_number":179,"context_line":"                )))"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def __eq__(self, other):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7931f727_60800c0a","line":178,"in_reply_to":"68ca29ea_7015a538","updated":"2024-12-16 06:30:07.000000000","message":"oh good call","commit_id":"758200067f8e6e0f2a6aa81bf24c872154c38b3f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"5a3e91d9f205a48efb59f8f01493dfae14517a33","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                    \u0027concurrent_gets\u0027,"},{"line_number":176,"context_line":"                    \u0027concurrency_timeout\u0027,"},{"line_number":177,"context_line":"                    \u0027concurrent_ec_extra_requests\u0027,"},{"line_number":178,"context_line":"                    \u0027request_node_count\u0027,"},{"line_number":179,"context_line":"                )))"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def __eq__(self, other):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1e3744d7_8b584e66","line":178,"in_reply_to":"7931f727_60800c0a","updated":"2024-12-16 06:35:28.000000000","message":"Done","commit_id":"758200067f8e6e0f2a6aa81bf24c872154c38b3f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d71caa35616ad67dcc2f653ccc97d03a5ced9526","unresolved":true,"context_lines":[{"line_number":191,"context_line":"            \u0027concurrent_gets\u0027,"},{"line_number":192,"context_line":"            \u0027concurrency_timeout\u0027,"},{"line_number":193,"context_line":"            \u0027concurrent_ec_extra_requests\u0027,"},{"line_number":194,"context_line":"            \u0027request_node_code\u0027,"},{"line_number":195,"context_line":"        ))"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"dc25c0ff_dccb218c","line":194,"updated":"2024-12-14 01:22:05.000000000","message":"Can we ever have two instances be equal if we\u0027re comparing lambdas like this?","commit_id":"758200067f8e6e0f2a6aa81bf24c872154c38b3f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"5a3e91d9f205a48efb59f8f01493dfae14517a33","unresolved":false,"context_lines":[{"line_number":191,"context_line":"            \u0027concurrent_gets\u0027,"},{"line_number":192,"context_line":"            \u0027concurrency_timeout\u0027,"},{"line_number":193,"context_line":"            \u0027concurrent_ec_extra_requests\u0027,"},{"line_number":194,"context_line":"            \u0027request_node_code\u0027,"},{"line_number":195,"context_line":"        ))"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"2d0c2feb_a307ba76","line":194,"in_reply_to":"dc25c0ff_dccb218c","updated":"2024-12-16 06:35:28.000000000","message":"Done","commit_id":"758200067f8e6e0f2a6aa81bf24c872154c38b3f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"7d434ffa4717155e1e29cc13ffcf499caa9e823f","unresolved":true,"context_lines":[{"line_number":175,"context_line":"                    \u0027request_node_count\u0027,"},{"line_number":176,"context_line":"                )))"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def __eq__(self, other):"},{"line_number":179,"context_line":"        if not isinstance(other, ProxyOverrideOptions):"},{"line_number":180,"context_line":"            return False"},{"line_number":181,"context_line":"        return all(getattr(self, k) \u003d\u003d getattr(other, k) for k in ("}],"source_content_type":"text/x-python","patch_set":2,"id":"2fa90b8c_17cfcf48","line":178,"updated":"2024-12-18 01:13:45.000000000","message":"I wonder if this may have been part of why we wanted to `.lower()` normalization... OTOH, it did nothing to try to normalize spacing, so... meh.","commit_id":"6d94c098f9f50812f00c686ee9820c96c67c58c8"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"5a3e91d9f205a48efb59f8f01493dfae14517a33","unresolved":true,"context_lines":[{"line_number":346,"context_line":"        self.request_node_count \u003d conf.get("},{"line_number":347,"context_line":"            \u0027request_node_count\u0027, \u00272 * replicas\u0027)"},{"line_number":348,"context_line":"        self.request_node_count_fn \u003d config_request_node_count_value("},{"line_number":349,"context_line":"            self.request_node_count)"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        register_swift_info("},{"line_number":352,"context_line":"            version\u003dswift_version,"}],"source_content_type":"text/x-python","patch_set":2,"id":"a2665c21_e0bad772","line":349,"updated":"2024-12-16 06:35:28.000000000","message":"I wonder if I can just remove this from the proxy __init__ all together. And make sure everything uses the _override options, even for the account and container... but that might start looking more ugly.\n\nBasically the thought is the nodeiter will these if the proxy isn\u0027t provided, otherwise fall us e policy overrides... however this feels alot duplicatin in code.\n\nI guess I should have a play and see how it shakes out.","commit_id":"6d94c098f9f50812f00c686ee9820c96c67c58c8"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"3432abdb52435b9633b48bbf798e3c581b9c1679","unresolved":true,"context_lines":[{"line_number":346,"context_line":"        self.request_node_count \u003d conf.get("},{"line_number":347,"context_line":"            \u0027request_node_count\u0027, \u00272 * replicas\u0027)"},{"line_number":348,"context_line":"        self.request_node_count_fn \u003d config_request_node_count_value("},{"line_number":349,"context_line":"            self.request_node_count)"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        register_swift_info("},{"line_number":352,"context_line":"            version\u003dswift_version,"}],"source_content_type":"text/x-python","patch_set":2,"id":"cbdae901_e365f59c","line":349,"in_reply_to":"a2665c21_e0bad772","updated":"2025-01-16 00:56:22.000000000","message":"well, those base controller tests would have to learn a different way to mock; I sort of came to like:\n\n```\nself.app._override_options \u003d self.app._load_per_policy_config({\n    \u0027request_node_count\u0027: my_test_value})\n```\n\nbut it looks like some of them mock it with a lambda that\u0027s not expressible in the config:\n\n```\nself.app.request_node_count \u003d lambda r: r * 2 + 3\n```\n\nwould have to calculate `self.policy.object_ring.replicas * 2 + 3` and set it explicitly.\n\nBut even MORE places are just calling it and the diff is full of `s/request_node_count(/request_node_count_fn(` anyway - at which point changing all those test callsites to `self.app.get_policy_overrides(None).request_node_count_fn()` wouldn\u0027t be much worse.\n\nIf you wanted to avoid the churn in this diff probably better to add a new `request_node_count_config` attribute as the string and leave `request_node_count` as the callable.","commit_id":"6d94c098f9f50812f00c686ee9820c96c67c58c8"}],"test/unit/proxy/controllers/test_base.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"3432abdb52435b9633b48bbf798e3c581b9c1679","unresolved":true,"context_lines":[{"line_number":1627,"context_line":"        node_iter \u003d NodeIter("},{"line_number":1628,"context_line":"            \u0027container\u0027, self.app, ring, 0, self.logger,"},{"line_number":1629,"context_line":"            request\u003dRequest.blank(\u0027\u0027))"},{"line_number":1630,"context_line":"        # 1 x replica default"},{"line_number":1631,"context_line":"        self.assertEqual(len(list(node_iter)), 8)"},{"line_number":1632,"context_line":""},{"line_number":1633,"context_line":"        # now a policy that isn\u0027t overriden should be the same"}],"source_content_type":"text/x-python","patch_set":2,"id":"37625c7a_8972920c","line":1630,"updated":"2025-01-16 00:56:22.000000000","message":"maybe instead of \"default\" (which has connotations of a placeholder config value for unspecified option) call this `1 x replica configured as policy override fallback`","commit_id":"6d94c098f9f50812f00c686ee9820c96c67c58c8"}]}
