)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"68f7815b083b5b266da30b9cfb47a6c1c00da9ee","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Object-server: add periodic greenthread yielding during file read."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Co-Authored-By: Clay Gerrard \u003cclay.gerrard@gmail.com\u003e"},{"line_number":10,"context_line":"Change-Id: I80b04bad0601b6cd6caef35498f89d4ba70a4fd4"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"725dd543_909f41ef","line":9,"updated":"2023-10-10 15:17:13.000000000","message":"undeserved credit","commit_id":"bf84f5b7f49704dfece946b5a91e9a5dfe16f006"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"7a049cbdf78048172f6f307d5ba3be67902d655d","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Object-server: add periodic greenthread yielding during file read."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Co-Authored-By: Clay Gerrard \u003cclay.gerrard@gmail.com\u003e"},{"line_number":10,"context_line":"Change-Id: I80b04bad0601b6cd6caef35498f89d4ba70a4fd4"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"724a216d_1f6e2a61","line":9,"in_reply_to":"725dd543_909f41ef","updated":"2023-10-11 05:18:19.000000000","message":"The previous failed test cases were fixed by you!","commit_id":"bf84f5b7f49704dfece946b5a91e9a5dfe16f006"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"17a317004ab7911b613976d699b870f8c531f493","unresolved":true,"context_lines":[{"line_number":11,"context_line":"eventlet sleep called. When network outpace the slow disk IO,"},{"line_number":12,"context_line":"it\u0027s possible one large and slow GET request could cause"},{"line_number":13,"context_line":"eventlet hub not to schedule any other green threads for a"},{"line_number":14,"context_line":"long time of period. To improve this, this patch add a"},{"line_number":15,"context_line":"configurable sleep parameter into DiskFile reader, which"},{"line_number":16,"context_line":"is \u0027cooperative_period\u0027 with a default value of -1 (disabled)."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"72016f2e_88f69022","line":14,"updated":"2024-02-07 12:56:38.000000000","message":"s/time of period/period of time/","commit_id":"c5ac8600357b2cd22d61a075e4e13ee629052ca4"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"585a5185a0775858c2bd19bc553e9f8ed4458df6","unresolved":false,"context_lines":[{"line_number":11,"context_line":"eventlet sleep called. When network outpace the slow disk IO,"},{"line_number":12,"context_line":"it\u0027s possible one large and slow GET request could cause"},{"line_number":13,"context_line":"eventlet hub not to schedule any other green threads for a"},{"line_number":14,"context_line":"long time of period. To improve this, this patch add a"},{"line_number":15,"context_line":"configurable sleep parameter into DiskFile reader, which"},{"line_number":16,"context_line":"is \u0027cooperative_period\u0027 with a default value of -1 (disabled)."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"3160d25c_77b9d137","line":14,"in_reply_to":"72016f2e_88f69022","updated":"2024-02-08 05:59:06.000000000","message":"Done","commit_id":"c5ac8600357b2cd22d61a075e4e13ee629052ca4"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e6c070e2e16e62230ea7429ff5162f872de3df81","unresolved":true,"context_lines":[{"line_number":13,"context_line":"eventlet hub not to schedule any other green threads for a"},{"line_number":14,"context_line":"long period of time. To improve this, this patch add a"},{"line_number":15,"context_line":"configurable sleep parameter into DiskFile reader, which"},{"line_number":16,"context_line":"is \u0027cooperative_period\u0027 with a default value of -1 (disabled)."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Co-Authored-By: Clay Gerrard \u003cclay.gerrard@gmail.com\u003e"},{"line_number":19,"context_line":"Change-Id: I80b04bad0601b6cd6caef35498f89d4ba70a4fd4"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"f7a0c030_7f07bf02","line":16,"updated":"2024-02-08 10:42:18.000000000","message":"the default is now 0 (disabled)","commit_id":"0696a6a3d8be58c7a9b56c088f136e21f4ea7c2e"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e777b5599d619b8f59a87d890243eb5c62773d5c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"aae8a80b_d6820491","updated":"2023-10-03 15:31:53.000000000","message":"I *think* it\u0027s fair to assume that Swift always assumed that network buffers would eventually fill and we\u0027d trampoline at *some* point during large-ish transfers.\n\nAnd I\u0027m pretty sure I like how we\u0027re guaranteed to trampoline at least once, even for small objects -- should help get our object-server timings more representative of what the proxies would observe. That might be one argument *against* using `CooperativeIterator`...\n\nI\u0027d definitely be interested in carrying this and seeing what it does to graphs.","commit_id":"26f3cd3aa47ce0ede0ce68c51c68897ea77f9b60"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"4bf341be51c95ef0e1372d263d1ba0f5b3b2274a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"08ff891d_17db882b","updated":"2023-10-06 05:07:48.000000000","message":"thanks for the reviews!","commit_id":"47d5fd7fe32698b8233fd285ed546405d644435f"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"68f7815b083b5b266da30b9cfb47a6c1c00da9ee","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"c639f463_0aadfc9c","updated":"2023-10-10 15:17:13.000000000","message":"I\u0027m game to carry this with a default of 5 - it\u0027s probably fine\n\ni don\u0027t like having to pick an \"arbitrarily large\" value to disable, I think an explicit \"disable with -1\" would be a reaonable default to merge upstrea util we have some experience telling us this is definately something people want.  It\u0027s really no problem for our SRE to configure the value we want with conf.d - moving upstream default behavior around to run experiements in our clusters is definately the tail wagging the dog.\n\nyou need to update etc/ sample configs for any new configuration values; a paragraph there goes a long way\n\nI think a test that asserts how many times we call sleep would be a lot better for maintaining behaviors vs testing implementation.","commit_id":"bf84f5b7f49704dfece946b5a91e9a5dfe16f006"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"7a049cbdf78048172f6f307d5ba3be67902d655d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"988ab3ba_d61e94c9","updated":"2023-10-11 05:18:19.000000000","message":"Thanks for the reviews!","commit_id":"bf84f5b7f49704dfece946b5a91e9a5dfe16f006"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"df444564614a08b03d3586818deb337d02028c61","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"145882e4_f3dacd65","updated":"2023-10-16 15:08:30.000000000","message":"I\u0027m not sure the sleep_in_calll is going to impact the timing_since metric - the sleep happens before the timing_stats decorator is called","commit_id":"f5b9aed9bad55f3db7c86b0d4e763b57b908b9eb"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"94947236b4383f7e18e649f0239d0c6de2164458","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"6cb53f1b_adcd4803","updated":"2023-10-16 15:37:46.000000000","message":"maybe call sleep from the timing_stats decorator?? https://review.opendev.org/c/openstack/swift/+/898436","commit_id":"f5b9aed9bad55f3db7c86b0d4e763b57b908b9eb"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"0f15a23e186245a811a38d6cde0cccefb0f8b238","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"29a14fae_baddab5a","in_reply_to":"04990d02_073f98ed","updated":"2024-02-02 16:45:13.000000000","message":"sleep_in_calll is removed.","commit_id":"f5b9aed9bad55f3db7c86b0d4e763b57b908b9eb"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"00ce2974f60941e635998b298c65c0e0bcf8c2a8","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":7,"id":"04990d02_073f98ed","in_reply_to":"145882e4_f3dacd65","updated":"2023-10-16 15:54:35.000000000","message":"Thanks for taking a look at this patch. This sleep_in_call won\u0027t impact the timing_since metric, but will impact the request latency logging. see here at: https://review.opendev.org/c/openstack/swift/+/896872/7/swift/obj/server.py#1366\n\nWe found out those request latency logs in prod don\u0027t reflect the real latencies with greenthreads waiting for being scheduled, so sleep_in_call aims at this target mostly.","commit_id":"f5b9aed9bad55f3db7c86b0d4e763b57b908b9eb"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"82fe547d0eeeffb9ee721c32fe583b02d57060ee","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"c3a82bb0_716ed4ed","updated":"2023-10-16 19:52:58.000000000","message":"looking forward to doing some more testing/polishing on this one!","commit_id":"b60b6dd7da008db476af36f9b06c57f26d4d63d5"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"696efd7a267cb3e29e416c414bacd52aebe54c7b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"b2b3c69d_9f114dfa","updated":"2024-02-05 04:57:38.000000000","message":"Thanks a lot for the reviews!","commit_id":"5cb9c2ca7a0da13f1deda1c5c9a1548f44e0302b"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"17a317004ab7911b613976d699b870f8c531f493","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"725ea1ca_44e79fff","updated":"2024-02-07 12:56:38.000000000","message":"-1 is perhaps too harsh - this all works, and the test coverage is ok, but I think the minor cleanups are worthwhile before we merge, and I\u0027d really like to consider fixing CooperativeIterator to behave the way we want it to, see https://review.opendev.org/c/openstack/swift/+/908300.","commit_id":"c5ac8600357b2cd22d61a075e4e13ee629052ca4"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"93f45f4597260f99151ce62845d539382e3189c6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"99d29fa2_0090cad5","updated":"2024-02-05 17:45:11.000000000","message":"recheck\n\nthere was failed probe test for centos8 which is unrelated and flaky. test/probe/test_container_merge_policy_index.py::TestContainerMergePolicyIndex::test_reconciler_move_object_twice","commit_id":"c5ac8600357b2cd22d61a075e4e13ee629052ca4"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"585a5185a0775858c2bd19bc553e9f8ed4458df6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"3171145f_0810a849","updated":"2024-02-08 05:59:06.000000000","message":"thanks a lot for the reviews!","commit_id":"c5ac8600357b2cd22d61a075e4e13ee629052ca4"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"bbbf7457b8bc0b40205c886d6cc51a94af313276","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":16,"id":"a5a6bc13_b6d45dc2","updated":"2024-02-27 00:24:24.000000000","message":"I\u0027ll push up a patchset with it fixed and then land this. Nice one!","commit_id":"391c4f16c4786e30eee31a66db62ca6aa24c6377"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"9da4ade76462a45b2590fafef984d4281f5bf8e8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":17,"id":"a35c3ccf_ed3f25f0","updated":"2024-02-27 02:43:15.000000000","message":"Looks great. And a +A because it had a +2 from Al and since there has only been some rebases.","commit_id":"d5877179a5a03839d2ace56fc40b67a59f7e3028"}],"etc/object-server.conf-sample":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"df444564614a08b03d3586818deb337d02028c61","unresolved":true,"context_lines":[{"line_number":148,"context_line":"# \u0027keep_cache_private\u0027 is false."},{"line_number":149,"context_line":"# keep_cache_slo_manifest \u003d false"},{"line_number":150,"context_line":"#"},{"line_number":151,"context_line":"# Cooperative_period defines how frequent object server GET request will perform"},{"line_number":152,"context_line":"# the cooperative yielding during iterating the disk chunks. For example, value"},{"line_number":153,"context_line":"# of \u00275\u0027 will insert one sleep() after every 5 chunks read. And value of \u0027-1\u0027 will"},{"line_number":154,"context_line":"# turn off any cooperative yielding."}],"source_content_type":"application/octet-stream","patch_set":7,"id":"c9f5f0cd_ca64102f","line":151,"range":{"start_line":151,"start_character":2,"end_line":151,"end_character":20},"updated":"2023-10-16 15:08:30.000000000","message":"nit: the actual option is lower case","commit_id":"f5b9aed9bad55f3db7c86b0d4e763b57b908b9eb"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"0f15a23e186245a811a38d6cde0cccefb0f8b238","unresolved":false,"context_lines":[{"line_number":148,"context_line":"# \u0027keep_cache_private\u0027 is false."},{"line_number":149,"context_line":"# keep_cache_slo_manifest \u003d false"},{"line_number":150,"context_line":"#"},{"line_number":151,"context_line":"# Cooperative_period defines how frequent object server GET request will perform"},{"line_number":152,"context_line":"# the cooperative yielding during iterating the disk chunks. For example, value"},{"line_number":153,"context_line":"# of \u00275\u0027 will insert one sleep() after every 5 chunks read. And value of \u0027-1\u0027 will"},{"line_number":154,"context_line":"# turn off any cooperative yielding."}],"source_content_type":"application/octet-stream","patch_set":7,"id":"b8a7f44b_81eb5501","line":151,"range":{"start_line":151,"start_character":2,"end_line":151,"end_character":20},"in_reply_to":"c9f5f0cd_ca64102f","updated":"2024-02-02 16:45:13.000000000","message":"Acknowledged","commit_id":"f5b9aed9bad55f3db7c86b0d4e763b57b908b9eb"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"df444564614a08b03d3586818deb337d02028c61","unresolved":true,"context_lines":[{"line_number":149,"context_line":"# keep_cache_slo_manifest \u003d false"},{"line_number":150,"context_line":"#"},{"line_number":151,"context_line":"# Cooperative_period defines how frequent object server GET request will perform"},{"line_number":152,"context_line":"# the cooperative yielding during iterating the disk chunks. For example, value"},{"line_number":153,"context_line":"# of \u00275\u0027 will insert one sleep() after every 5 chunks read. And value of \u0027-1\u0027 will"},{"line_number":154,"context_line":"# turn off any cooperative yielding."},{"line_number":155,"context_line":"# cooperative_period \u003d -1"}],"source_content_type":"application/octet-stream","patch_set":7,"id":"73bc527e_47b1d97d","line":152,"range":{"start_line":152,"start_character":48,"end_line":152,"end_character":59},"updated":"2023-10-16 15:08:30.000000000","message":"This file specifies 2 chunk sizes \n```\n# network_chunk_size \u003d 65536\n# disk_chunk_size \u003d 65536\n```\n\nI think we\u0027re talking about chunks of disk_chunk_size here. Probably worth specifically mentioning disk_chunk_size.","commit_id":"f5b9aed9bad55f3db7c86b0d4e763b57b908b9eb"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"0f15a23e186245a811a38d6cde0cccefb0f8b238","unresolved":false,"context_lines":[{"line_number":149,"context_line":"# keep_cache_slo_manifest \u003d false"},{"line_number":150,"context_line":"#"},{"line_number":151,"context_line":"# Cooperative_period defines how frequent object server GET request will perform"},{"line_number":152,"context_line":"# the cooperative yielding during iterating the disk chunks. For example, value"},{"line_number":153,"context_line":"# of \u00275\u0027 will insert one sleep() after every 5 chunks read. And value of \u0027-1\u0027 will"},{"line_number":154,"context_line":"# turn off any cooperative yielding."},{"line_number":155,"context_line":"# cooperative_period \u003d -1"}],"source_content_type":"application/octet-stream","patch_set":7,"id":"cdd6d8cf_8ff12662","line":152,"range":{"start_line":152,"start_character":48,"end_line":152,"end_character":59},"in_reply_to":"73bc527e_47b1d97d","updated":"2024-02-02 16:45:13.000000000","message":"Done","commit_id":"f5b9aed9bad55f3db7c86b0d4e763b57b908b9eb"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"df444564614a08b03d3586818deb337d02028c61","unresolved":true,"context_lines":[{"line_number":152,"context_line":"# the cooperative yielding during iterating the disk chunks. For example, value"},{"line_number":153,"context_line":"# of \u00275\u0027 will insert one sleep() after every 5 chunks read. And value of \u0027-1\u0027 will"},{"line_number":154,"context_line":"# turn off any cooperative yielding."},{"line_number":155,"context_line":"# cooperative_period \u003d -1"},{"line_number":156,"context_line":"#"},{"line_number":157,"context_line":"# If true, object server will perform cooperative yielding once in the \u0027__call__\u0027"},{"line_number":158,"context_line":"# function and before handling any actual operation logics. This would get the emitted"}],"source_content_type":"application/octet-stream","patch_set":7,"id":"7e90b0ec_e9449ec7","line":155,"updated":"2023-10-16 15:08:30.000000000","message":"-1 works, but I also would not object to CooperativeIterator being \"fixed\" so that period \u003d\u003d 0 means disabled.","commit_id":"f5b9aed9bad55f3db7c86b0d4e763b57b908b9eb"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"17a317004ab7911b613976d699b870f8c531f493","unresolved":true,"context_lines":[{"line_number":152,"context_line":"# the cooperative yielding during iterating the disk chunks. For example, value"},{"line_number":153,"context_line":"# of \u00275\u0027 will insert one sleep() after every 5 chunks read. And value of \u0027-1\u0027 will"},{"line_number":154,"context_line":"# turn off any cooperative yielding."},{"line_number":155,"context_line":"# cooperative_period \u003d -1"},{"line_number":156,"context_line":"#"},{"line_number":157,"context_line":"# If true, object server will perform cooperative yielding once in the \u0027__call__\u0027"},{"line_number":158,"context_line":"# function and before handling any actual operation logics. This would get the emitted"}],"source_content_type":"application/octet-stream","patch_set":7,"id":"c2dc2412_207cd63f","line":155,"in_reply_to":"6676acb4_b02e83c0","updated":"2024-02-07 12:56:38.000000000","message":"I think we could take the opportunity to improve CooperativeIterator https://review.opendev.org/c/openstack/swift/+/908300 - particularly to avoid the reader having to sanity check \u0027period\u0027 before constructing the iterator. Then we could use \u00270\u0027 to mean \u0027off\u0027.","commit_id":"f5b9aed9bad55f3db7c86b0d4e763b57b908b9eb"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"696efd7a267cb3e29e416c414bacd52aebe54c7b","unresolved":true,"context_lines":[{"line_number":152,"context_line":"# the cooperative yielding during iterating the disk chunks. For example, value"},{"line_number":153,"context_line":"# of \u00275\u0027 will insert one sleep() after every 5 chunks read. And value of \u0027-1\u0027 will"},{"line_number":154,"context_line":"# turn off any cooperative yielding."},{"line_number":155,"context_line":"# cooperative_period \u003d -1"},{"line_number":156,"context_line":"#"},{"line_number":157,"context_line":"# If true, object server will perform cooperative yielding once in the \u0027__call__\u0027"},{"line_number":158,"context_line":"# function and before handling any actual operation logics. This would get the emitted"}],"source_content_type":"application/octet-stream","patch_set":7,"id":"6676acb4_b02e83c0","line":155,"in_reply_to":"7e90b0ec_e9449ec7","updated":"2024-02-05 04:57:38.000000000","message":"in current implementation, ``period \u003d\u003d 0`` means that disk reader sleeps once BEFORE each next(), see test case here: https://review.opendev.org/c/openstack/swift/+/896872/10/test/unit/obj/test_server.py#4710","commit_id":"f5b9aed9bad55f3db7c86b0d4e763b57b908b9eb"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"585a5185a0775858c2bd19bc553e9f8ed4458df6","unresolved":false,"context_lines":[{"line_number":152,"context_line":"# the cooperative yielding during iterating the disk chunks. For example, value"},{"line_number":153,"context_line":"# of \u00275\u0027 will insert one sleep() after every 5 chunks read. And value of \u0027-1\u0027 will"},{"line_number":154,"context_line":"# turn off any cooperative yielding."},{"line_number":155,"context_line":"# cooperative_period \u003d -1"},{"line_number":156,"context_line":"#"},{"line_number":157,"context_line":"# If true, object server will perform cooperative yielding once in the \u0027__call__\u0027"},{"line_number":158,"context_line":"# function and before handling any actual operation logics. This would get the emitted"}],"source_content_type":"application/octet-stream","patch_set":7,"id":"4fbd64cf_08ed8ca4","line":155,"in_reply_to":"c2dc2412_207cd63f","updated":"2024-02-08 05:59:06.000000000","message":"sure, after rethinking what -1 and 0 mean here for CooperativeIterator, I feel it makes sense to use \u00270\u0027 for \u0027off\u0027.","commit_id":"f5b9aed9bad55f3db7c86b0d4e763b57b908b9eb"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"df444564614a08b03d3586818deb337d02028c61","unresolved":true,"context_lines":[{"line_number":156,"context_line":"#"},{"line_number":157,"context_line":"# If true, object server will perform cooperative yielding once in the \u0027__call__\u0027"},{"line_number":158,"context_line":"# function and before handling any actual operation logics. This would get the emitted"},{"line_number":159,"context_line":"# timing metrics to be closer to reflecting the time spent waiting in accept queues."},{"line_number":160,"context_line":"# sleep_in_call \u003d false"},{"line_number":161,"context_line":"#"},{"line_number":162,"context_line":"# on PUTs, sync data every n MB"}],"source_content_type":"application/octet-stream","patch_set":7,"id":"6b335ad7_145c4d85","line":159,"updated":"2023-10-16 15:08:30.000000000","message":"nit: please line wrap at column 80 - makes it easier to read in gerrit even if nowhere else","commit_id":"f5b9aed9bad55f3db7c86b0d4e763b57b908b9eb"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"0f15a23e186245a811a38d6cde0cccefb0f8b238","unresolved":false,"context_lines":[{"line_number":156,"context_line":"#"},{"line_number":157,"context_line":"# If true, object server will perform cooperative yielding once in the \u0027__call__\u0027"},{"line_number":158,"context_line":"# function and before handling any actual operation logics. This would get the emitted"},{"line_number":159,"context_line":"# timing metrics to be closer to reflecting the time spent waiting in accept queues."},{"line_number":160,"context_line":"# sleep_in_call \u003d false"},{"line_number":161,"context_line":"#"},{"line_number":162,"context_line":"# on PUTs, sync data every n MB"}],"source_content_type":"application/octet-stream","patch_set":7,"id":"1ece8136_b2494226","line":159,"in_reply_to":"6b335ad7_145c4d85","updated":"2024-02-02 16:45:13.000000000","message":"Done","commit_id":"f5b9aed9bad55f3db7c86b0d4e763b57b908b9eb"}],"swift/common/utils/__init__.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"68f7815b083b5b266da30b9cfb47a6c1c00da9ee","unresolved":true,"context_lines":[{"line_number":171,"context_line":"                          \u0027{policy_index}\u0027"},{"line_number":172,"context_line":"DEFAULT_LOCK_TIMEOUT \u003d 10"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"COOPERATIVE_ITERATOR_DEFAULT_PERIOD \u003d 5"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"class InvalidHashPathConfigError(ValueError):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1e494182_7875a2e7","line":174,"updated":"2023-10-10 15:17:13.000000000","message":"probably fine to pull this up to the top of this module; especially as we use this more we may find a better default","commit_id":"bf84f5b7f49704dfece946b5a91e9a5dfe16f006"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"7a049cbdf78048172f6f307d5ba3be67902d655d","unresolved":false,"context_lines":[{"line_number":171,"context_line":"                          \u0027{policy_index}\u0027"},{"line_number":172,"context_line":"DEFAULT_LOCK_TIMEOUT \u003d 10"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"COOPERATIVE_ITERATOR_DEFAULT_PERIOD \u003d 5"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"class InvalidHashPathConfigError(ValueError):"}],"source_content_type":"text/x-python","patch_set":4,"id":"fae7ee41_1bf78b3a","line":174,"in_reply_to":"1e494182_7875a2e7","updated":"2023-10-11 05:18:19.000000000","message":"No need to have it after using -1 option.","commit_id":"bf84f5b7f49704dfece946b5a91e9a5dfe16f006"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"82fe547d0eeeffb9ee721c32fe583b02d57060ee","unresolved":true,"context_lines":[{"line_number":1521,"context_line":"    swift\u0027s wsgi server controllers, based on response code."},{"line_number":1522,"context_line":"    \"\"\""},{"line_number":1523,"context_line":"    def decorating_func(func):"},{"line_number":1524,"context_line":"        method \u003d func.__name__"},{"line_number":1525,"context_line":""},{"line_number":1526,"context_line":"        @functools.wraps(func)"},{"line_number":1527,"context_line":"        def _timing_stats(ctrl, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":8,"id":"2c16d166_ba59ce61","line":1524,"updated":"2023-10-16 19:52:58.000000000","message":"this is some really opionated coupling","commit_id":"b60b6dd7da008db476af36f9b06c57f26d4d63d5"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"0f15a23e186245a811a38d6cde0cccefb0f8b238","unresolved":false,"context_lines":[{"line_number":1521,"context_line":"    swift\u0027s wsgi server controllers, based on response code."},{"line_number":1522,"context_line":"    \"\"\""},{"line_number":1523,"context_line":"    def decorating_func(func):"},{"line_number":1524,"context_line":"        method \u003d func.__name__"},{"line_number":1525,"context_line":""},{"line_number":1526,"context_line":"        @functools.wraps(func)"},{"line_number":1527,"context_line":"        def _timing_stats(ctrl, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":8,"id":"a78ceb3c_6bbcdaed","line":1524,"in_reply_to":"2c16d166_ba59ce61","updated":"2024-02-02 16:45:13.000000000","message":"Acknowledged","commit_id":"b60b6dd7da008db476af36f9b06c57f26d4d63d5"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"82fe547d0eeeffb9ee721c32fe583b02d57060ee","unresolved":true,"context_lines":[{"line_number":1526,"context_line":"        @functools.wraps(func)"},{"line_number":1527,"context_line":"        def _timing_stats(ctrl, *args, **kwargs):"},{"line_number":1528,"context_line":"            start_time \u003d time.time()"},{"line_number":1529,"context_line":"            if getattr(ctrl, \u0027sleep_in_call\u0027, False):"},{"line_number":1530,"context_line":"                sleep()"},{"line_number":1531,"context_line":"            resp \u003d func(ctrl, *args, **kwargs)"},{"line_number":1532,"context_line":"            # .timing is for successful responses *or* error codes that are"}],"source_content_type":"text/x-python","patch_set":8,"id":"436a957d_eac9f6f9","line":1529,"updated":"2023-10-16 19:52:58.000000000","message":"i don\u0027t like this behavior bleeding into here.  I don\u0027t like having to getattr; fails the grep test if I go looking for where self.sleep_in_call is used after seeing where it gets set.\n\nIn the base storage server context the WSGI Application and the \"Controller\" are the same object - this \"ctrl\" is just \"self\" - it\u0027ll definately have this attribute if it\u0027s an obj.server.ObjectController - so I think this works.\n\nBut I think this timing_stats decorator missing timing of stuff going on in `__call__` is just an annoying existing bug.","commit_id":"b60b6dd7da008db476af36f9b06c57f26d4d63d5"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"0f15a23e186245a811a38d6cde0cccefb0f8b238","unresolved":false,"context_lines":[{"line_number":1526,"context_line":"        @functools.wraps(func)"},{"line_number":1527,"context_line":"        def _timing_stats(ctrl, *args, **kwargs):"},{"line_number":1528,"context_line":"            start_time \u003d time.time()"},{"line_number":1529,"context_line":"            if getattr(ctrl, \u0027sleep_in_call\u0027, False):"},{"line_number":1530,"context_line":"                sleep()"},{"line_number":1531,"context_line":"            resp \u003d func(ctrl, *args, **kwargs)"},{"line_number":1532,"context_line":"            # .timing is for successful responses *or* error codes that are"}],"source_content_type":"text/x-python","patch_set":8,"id":"5d69e550_99405957","line":1529,"in_reply_to":"436a957d_eac9f6f9","updated":"2024-02-02 16:45:13.000000000","message":"ACK. self.sleep_in_call is removed.","commit_id":"b60b6dd7da008db476af36f9b06c57f26d4d63d5"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"82fe547d0eeeffb9ee721c32fe583b02d57060ee","unresolved":true,"context_lines":[{"line_number":1542,"context_line":"                                         start_time, **dec_kwargs)"},{"line_number":1543,"context_line":"            else:"},{"line_number":1544,"context_line":"                ctrl.logger.timing_since(method + \u0027.errors.timing\u0027,"},{"line_number":1545,"context_line":"                                         start_time, **dec_kwargs)"},{"line_number":1546,"context_line":"            return resp"},{"line_number":1547,"context_line":""},{"line_number":1548,"context_line":"        return _timing_stats"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa149d0c_84e37079","line":1545,"updated":"2023-10-16 19:52:58.000000000","message":"it seems like the dec_kwargs are mostly `sample_rate\u003d`","commit_id":"b60b6dd7da008db476af36f9b06c57f26d4d63d5"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"0f15a23e186245a811a38d6cde0cccefb0f8b238","unresolved":false,"context_lines":[{"line_number":1542,"context_line":"                                         start_time, **dec_kwargs)"},{"line_number":1543,"context_line":"            else:"},{"line_number":1544,"context_line":"                ctrl.logger.timing_since(method + \u0027.errors.timing\u0027,"},{"line_number":1545,"context_line":"                                         start_time, **dec_kwargs)"},{"line_number":1546,"context_line":"            return resp"},{"line_number":1547,"context_line":""},{"line_number":1548,"context_line":"        return _timing_stats"}],"source_content_type":"text/x-python","patch_set":8,"id":"032afc0e_804125c8","line":1545,"in_reply_to":"fa149d0c_84e37079","updated":"2024-02-02 16:45:13.000000000","message":"Acknowledged","commit_id":"b60b6dd7da008db476af36f9b06c57f26d4d63d5"}],"swift/obj/diskfile.py":[{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"8bd3d72d28cfc6179e38100c6b17f1f0e7f668af","unresolved":true,"context_lines":[{"line_number":2137,"context_line":"    def __iter__(self):"},{"line_number":2138,"context_line":"        \"\"\"Returns an iterator over the data file.\"\"\""},{"line_number":2139,"context_line":"        try:"},{"line_number":2140,"context_line":"            nchunks \u003d 0"},{"line_number":2141,"context_line":"            dropped_cache \u003d 0"},{"line_number":2142,"context_line":"            self._bytes_read \u003d 0"},{"line_number":2143,"context_line":"            self._started_at_0 \u003d False"}],"source_content_type":"text/x-python","patch_set":1,"id":"a0853620_eec6a307","line":2140,"updated":"2023-09-28 23:52:56.000000000","message":"I can\u0027t reuse CooperativeIterator here, since this iterator is implemented by using yield within \"__iter__\" while CooperativeIterator use \"__next__\". maybe we can add another helper class?","commit_id":"26f3cd3aa47ce0ede0ce68c51c68897ea77f9b60"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"4bf341be51c95ef0e1372d263d1ba0f5b3b2274a","unresolved":false,"context_lines":[{"line_number":2137,"context_line":"    def __iter__(self):"},{"line_number":2138,"context_line":"        \"\"\"Returns an iterator over the data file.\"\"\""},{"line_number":2139,"context_line":"        try:"},{"line_number":2140,"context_line":"            nchunks \u003d 0"},{"line_number":2141,"context_line":"            dropped_cache \u003d 0"},{"line_number":2142,"context_line":"            self._bytes_read \u003d 0"},{"line_number":2143,"context_line":"            self._started_at_0 \u003d False"}],"source_content_type":"text/x-python","patch_set":1,"id":"dc4d9823_2e01a178","line":2140,"in_reply_to":"4ff19eb2_4dc361c3","updated":"2023-10-06 05:07:48.000000000","message":"Ack","commit_id":"26f3cd3aa47ce0ede0ce68c51c68897ea77f9b60"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e777b5599d619b8f59a87d890243eb5c62773d5c","unresolved":true,"context_lines":[{"line_number":2137,"context_line":"    def __iter__(self):"},{"line_number":2138,"context_line":"        \"\"\"Returns an iterator over the data file.\"\"\""},{"line_number":2139,"context_line":"        try:"},{"line_number":2140,"context_line":"            nchunks \u003d 0"},{"line_number":2141,"context_line":"            dropped_cache \u003d 0"},{"line_number":2142,"context_line":"            self._bytes_read \u003d 0"},{"line_number":2143,"context_line":"            self._started_at_0 \u003d False"}],"source_content_type":"text/x-python","patch_set":1,"id":"dcef6633_14413e81","line":2140,"in_reply_to":"a0853620_eec6a307","updated":"2023-10-03 15:31:53.000000000","message":"Would it work to do something like\n```\nresponse \u003d Response(\n    app_iter\u003dCooperativeIterator(disk_file.reader(keep_cache\u003dkeep_cache)),\n    ...\n)\n```\nup in `obj/server.py`?","commit_id":"26f3cd3aa47ce0ede0ce68c51c68897ea77f9b60"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0be2485d4d1760f8270066b605054f79958f0e04","unresolved":true,"context_lines":[{"line_number":2137,"context_line":"    def __iter__(self):"},{"line_number":2138,"context_line":"        \"\"\"Returns an iterator over the data file.\"\"\""},{"line_number":2139,"context_line":"        try:"},{"line_number":2140,"context_line":"            nchunks \u003d 0"},{"line_number":2141,"context_line":"            dropped_cache \u003d 0"},{"line_number":2142,"context_line":"            self._bytes_read \u003d 0"},{"line_number":2143,"context_line":"            self._started_at_0 \u003d False"}],"source_content_type":"text/x-python","patch_set":1,"id":"4ff19eb2_4dc361c3","line":2140,"in_reply_to":"dcef6633_14413e81","updated":"2023-10-03 20:40:27.000000000","message":"one benifit of using a wrapper is that it would be easier to make conditional/opt-in - which would make it a lot less scary to carry (and easier to A/B test in prod)","commit_id":"26f3cd3aa47ce0ede0ce68c51c68897ea77f9b60"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e777b5599d619b8f59a87d890243eb5c62773d5c","unresolved":true,"context_lines":[{"line_number":2158,"context_line":"                # than once every 5 chunks, depending on how blocking our"},{"line_number":2159,"context_line":"                # network IO is; the explicit sleep here simply provides a"},{"line_number":2160,"context_line":"                # lower bound on the rate of trampolining."},{"line_number":2161,"context_line":"                if nchunks % 5 \u003d\u003d 0:"},{"line_number":2162,"context_line":"                    sleep()"},{"line_number":2163,"context_line":"                try:"},{"line_number":2164,"context_line":"                    chunk \u003d self._fp.read(self._disk_chunk_size)"}],"source_content_type":"text/x-python","patch_set":1,"id":"2d0f7650_15641d5a","line":2161,"updated":"2023-10-03 15:31:53.000000000","message":"OK, `nchunks` starts at 0, and we increment *after* the sleep -- so we\u0027ll always trampoline at least once, even if it\u0027s a zero-byte object.","commit_id":"26f3cd3aa47ce0ede0ce68c51c68897ea77f9b60"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"7a049cbdf78048172f6f307d5ba3be67902d655d","unresolved":false,"context_lines":[{"line_number":2158,"context_line":"                # than once every 5 chunks, depending on how blocking our"},{"line_number":2159,"context_line":"                # network IO is; the explicit sleep here simply provides a"},{"line_number":2160,"context_line":"                # lower bound on the rate of trampolining."},{"line_number":2161,"context_line":"                if nchunks % 5 \u003d\u003d 0:"},{"line_number":2162,"context_line":"                    sleep()"},{"line_number":2163,"context_line":"                try:"},{"line_number":2164,"context_line":"                    chunk \u003d self._fp.read(self._disk_chunk_size)"}],"source_content_type":"text/x-python","patch_set":1,"id":"f4b22cd9_ec332b4f","line":2161,"in_reply_to":"2d0f7650_15641d5a","updated":"2023-10-11 05:18:19.000000000","message":"I added another independent option \u0027sleep_in_call\u0027 for this.","commit_id":"26f3cd3aa47ce0ede0ce68c51c68897ea77f9b60"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"68f7815b083b5b266da30b9cfb47a6c1c00da9ee","unresolved":true,"context_lines":[{"line_number":2112,"context_line":"    def __init__(self, fp, data_file, obj_size, etag,"},{"line_number":2113,"context_line":"                 disk_chunk_size, keep_cache_size, device_path, logger,"},{"line_number":2114,"context_line":"                 quarantine_hook, use_splice, pipe_size, diskfile,"},{"line_number":2115,"context_line":"                 keep_cache\u003dFalse, cooperative_period\u003dNone):"},{"line_number":2116,"context_line":"        # Parameter tracking"},{"line_number":2117,"context_line":"        self._fp \u003d fp"},{"line_number":2118,"context_line":"        self._data_file \u003d data_file"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f9d8a3c_e34fa840","line":2115,"updated":"2023-10-10 15:17:13.000000000","message":"not sure about the default here; for anyone using DiskFile directly this is probably the most backwards compatible default.\n\nActually; I don\u0027t see anyway to opt out?  `0` seems to be mean \"yield every chunk\"","commit_id":"bf84f5b7f49704dfece946b5a91e9a5dfe16f006"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"7a049cbdf78048172f6f307d5ba3be67902d655d","unresolved":false,"context_lines":[{"line_number":2112,"context_line":"    def __init__(self, fp, data_file, obj_size, etag,"},{"line_number":2113,"context_line":"                 disk_chunk_size, keep_cache_size, device_path, logger,"},{"line_number":2114,"context_line":"                 quarantine_hook, use_splice, pipe_size, diskfile,"},{"line_number":2115,"context_line":"                 keep_cache\u003dFalse, cooperative_period\u003dNone):"},{"line_number":2116,"context_line":"        # Parameter tracking"},{"line_number":2117,"context_line":"        self._fp \u003d fp"},{"line_number":2118,"context_line":"        self._data_file \u003d data_file"}],"source_content_type":"text/x-python","patch_set":4,"id":"863ae707_d301cdcc","line":2115,"in_reply_to":"5f9d8a3c_e34fa840","updated":"2023-10-11 05:18:19.000000000","message":"0 is to \"yield before every chunk\" and 1 is to \"yield after every chunk\". Yes, -1 is a good choice to disable it other than a arbitrarily large value.","commit_id":"bf84f5b7f49704dfece946b5a91e9a5dfe16f006"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"68f7815b083b5b266da30b9cfb47a6c1c00da9ee","unresolved":true,"context_lines":[{"line_number":2159,"context_line":"        return CooperativeIterator("},{"line_number":2160,"context_line":"            self._inner_iter(),"},{"line_number":2161,"context_line":"            period\u003dself._cooperative_period"},{"line_number":2162,"context_line":"            or COOPERATIVE_ITERATOR_DEFAULT_PERIOD,"},{"line_number":2163,"context_line":"        )"},{"line_number":2164,"context_line":""},{"line_number":2165,"context_line":"    def _inner_iter(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"2483b9eb_4702b3c7","line":2162,"updated":"2023-10-10 15:17:13.000000000","message":"definately don\u0027t want to swapping out the value of self._cooperative_period at this point.  With all the plumbing going on it\u0027d probably be better to just pass in\n\n    period\u003dself._cooperative_period\n\nperiod.  ;)\n\nFor ultimate opt-in configurtion I think I\u0027d do:\n\n```\napp_iter \u003d self._data_iter()\nif self._cooperative_period \u003e\u003d 0:\n    app_iter \u003d CooperativeIter(app_iter, period\u003dself._cooperative_period)\nreturn app_iter\n```","commit_id":"bf84f5b7f49704dfece946b5a91e9a5dfe16f006"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"7a049cbdf78048172f6f307d5ba3be67902d655d","unresolved":false,"context_lines":[{"line_number":2159,"context_line":"        return CooperativeIterator("},{"line_number":2160,"context_line":"            self._inner_iter(),"},{"line_number":2161,"context_line":"            period\u003dself._cooperative_period"},{"line_number":2162,"context_line":"            or COOPERATIVE_ITERATOR_DEFAULT_PERIOD,"},{"line_number":2163,"context_line":"        )"},{"line_number":2164,"context_line":""},{"line_number":2165,"context_line":"    def _inner_iter(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3ed53ec3_bd0a27c0","line":2162,"in_reply_to":"2483b9eb_4702b3c7","updated":"2023-10-11 05:18:19.000000000","message":"Ack","commit_id":"bf84f5b7f49704dfece946b5a91e9a5dfe16f006"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"68f7815b083b5b266da30b9cfb47a6c1c00da9ee","unresolved":true,"context_lines":[{"line_number":3007,"context_line":"            self._manager.keep_cache_size, self._device_path, self._logger,"},{"line_number":3008,"context_line":"            use_splice\u003dself._use_splice, quarantine_hook\u003d_quarantine_hook,"},{"line_number":3009,"context_line":"            pipe_size\u003dself._pipe_size, diskfile\u003dself, keep_cache\u003dkeep_cache,"},{"line_number":3010,"context_line":"            cooperative_period\u003dcooperative_period)"},{"line_number":3011,"context_line":"        # At this point the reader object is now responsible for closing"},{"line_number":3012,"context_line":"        # the file pointer."},{"line_number":3013,"context_line":"        self._fp \u003d None"}],"source_content_type":"text/x-python","patch_set":4,"id":"e3bb6083_e27f2735","line":3010,"updated":"2023-10-10 15:17:13.000000000","message":"I think in the past to avoid this param list growing we\u0027ve plumbed the object-server\u0027s configuration into the manager and stolen configuration when crafting diskfile objects from there.\n\nI\u0027m actually surprised that Readers don\u0027t get a back-reference to their manager - DiskFile\u0027s do.","commit_id":"bf84f5b7f49704dfece946b5a91e9a5dfe16f006"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"7a049cbdf78048172f6f307d5ba3be67902d655d","unresolved":false,"context_lines":[{"line_number":3007,"context_line":"            self._manager.keep_cache_size, self._device_path, self._logger,"},{"line_number":3008,"context_line":"            use_splice\u003dself._use_splice, quarantine_hook\u003d_quarantine_hook,"},{"line_number":3009,"context_line":"            pipe_size\u003dself._pipe_size, diskfile\u003dself, keep_cache\u003dkeep_cache,"},{"line_number":3010,"context_line":"            cooperative_period\u003dcooperative_period)"},{"line_number":3011,"context_line":"        # At this point the reader object is now responsible for closing"},{"line_number":3012,"context_line":"        # the file pointer."},{"line_number":3013,"context_line":"        self._fp \u003d None"}],"source_content_type":"text/x-python","patch_set":4,"id":"01a5976a_32ec414f","line":3010,"in_reply_to":"e3bb6083_e27f2735","updated":"2023-10-11 05:18:19.000000000","message":"Ack","commit_id":"bf84f5b7f49704dfece946b5a91e9a5dfe16f006"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"df444564614a08b03d3586818deb337d02028c61","unresolved":true,"context_lines":[{"line_number":2107,"context_line":"    :param diskfile: the diskfile creating this DiskFileReader instance"},{"line_number":2108,"context_line":"    :param keep_cache: should resulting reads be kept in the buffer cache"},{"line_number":2109,"context_line":"    :param cooperative_period: the period parameter when does cooperative"},{"line_number":2110,"context_line":"                               yielding during file read"},{"line_number":2111,"context_line":"    \"\"\""},{"line_number":2112,"context_line":"    def __init__(self, fp, data_file, obj_size, etag,"},{"line_number":2113,"context_line":"                 disk_chunk_size, keep_cache_size, device_path, logger,"}],"source_content_type":"text/x-python","patch_set":7,"id":"90f5fbb9_962866cd","line":2110,"updated":"2023-10-16 15:08:30.000000000","message":"hmmm, so we pass this option directly from the server to DiskFile.reader(), rather than via DiskFileManager. But use_splice is set via DiskFileManager-\u003ediskfile.\n\nDo we imagine a server creating readers with different cooperative_periods? Could/should this be managed via DiskFilManager and accessed via DiskFileReader.manager.cooperative_period?","commit_id":"f5b9aed9bad55f3db7c86b0d4e763b57b908b9eb"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"82fe547d0eeeffb9ee721c32fe583b02d57060ee","unresolved":true,"context_lines":[{"line_number":2107,"context_line":"    :param diskfile: the diskfile creating this DiskFileReader instance"},{"line_number":2108,"context_line":"    :param keep_cache: should resulting reads be kept in the buffer cache"},{"line_number":2109,"context_line":"    :param cooperative_period: the period parameter when does cooperative"},{"line_number":2110,"context_line":"                               yielding during file read"},{"line_number":2111,"context_line":"    \"\"\""},{"line_number":2112,"context_line":"    def __init__(self, fp, data_file, obj_size, etag,"},{"line_number":2113,"context_line":"                 disk_chunk_size, keep_cache_size, device_path, logger,"}],"source_content_type":"text/x-python","patch_set":7,"id":"911c9737_6c96b8d5","line":2110,"in_reply_to":"90f5fbb9_962866cd","updated":"2023-10-16 19:52:58.000000000","message":"I would like to see us be more consistent in this direction!  But I think there\u0027s some prior art going the heavy plumbing way too sadly.","commit_id":"f5b9aed9bad55f3db7c86b0d4e763b57b908b9eb"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"17a317004ab7911b613976d699b870f8c531f493","unresolved":true,"context_lines":[{"line_number":2160,"context_line":"        if ("},{"line_number":2161,"context_line":"            self._cooperative_period is not None"},{"line_number":2162,"context_line":"            and self._cooperative_period \u003e\u003d 0"},{"line_number":2163,"context_line":"        ):"},{"line_number":2164,"context_line":"            inner_iter \u003d CooperativeIterator("},{"line_number":2165,"context_line":"                inner_iter, period\u003dself._cooperative_period)"},{"line_number":2166,"context_line":"        return inner_iter"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a302337_1748fa43","line":2163,"updated":"2024-02-07 12:56:38.000000000","message":"lets\u0027 encapsulate this in CooperativeIterator - this is the first use case where we actually pass in a period to the constructor, so let\u0027s take the opportunity to improve it and make things simpler for callers.\n\nhttps://review.opendev.org/c/openstack/swift/+/908300","commit_id":"c5ac8600357b2cd22d61a075e4e13ee629052ca4"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"585a5185a0775858c2bd19bc553e9f8ed4458df6","unresolved":false,"context_lines":[{"line_number":2160,"context_line":"        if ("},{"line_number":2161,"context_line":"            self._cooperative_period is not None"},{"line_number":2162,"context_line":"            and self._cooperative_period \u003e\u003d 0"},{"line_number":2163,"context_line":"        ):"},{"line_number":2164,"context_line":"            inner_iter \u003d CooperativeIterator("},{"line_number":2165,"context_line":"                inner_iter, period\u003dself._cooperative_period)"},{"line_number":2166,"context_line":"        return inner_iter"}],"source_content_type":"text/x-python","patch_set":11,"id":"ea1dfb1b_83bcc393","line":2163,"in_reply_to":"5a302337_1748fa43","updated":"2024-02-08 05:59:06.000000000","message":"Acknowledged","commit_id":"c5ac8600357b2cd22d61a075e4e13ee629052ca4"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"17a317004ab7911b613976d699b870f8c531f493","unresolved":true,"context_lines":[{"line_number":2996,"context_line":""},{"line_number":2997,"context_line":"        :param keep_cache: caller\u0027s preference for keeping data read in the"},{"line_number":2998,"context_line":"                           OS buffer cache"},{"line_number":2999,"context_line":"        :param cooperative_period: the period parameter when does cooperative"},{"line_number":3000,"context_line":"                                   yielding during file read"},{"line_number":3001,"context_line":"        :param _quarantine_hook: 1-arg callable called when obj quarantined;"},{"line_number":3002,"context_line":"                                 the arg is the reason for quarantine."}],"source_content_type":"text/x-python","patch_set":11,"id":"1457d442_81578c8a","line":2999,"range":{"start_line":2999,"start_character":56,"end_line":2999,"end_character":65},"updated":"2024-02-07 12:56:38.000000000","message":"I think this would read better is s/when does/for/","commit_id":"c5ac8600357b2cd22d61a075e4e13ee629052ca4"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"585a5185a0775858c2bd19bc553e9f8ed4458df6","unresolved":false,"context_lines":[{"line_number":2996,"context_line":""},{"line_number":2997,"context_line":"        :param keep_cache: caller\u0027s preference for keeping data read in the"},{"line_number":2998,"context_line":"                           OS buffer cache"},{"line_number":2999,"context_line":"        :param cooperative_period: the period parameter when does cooperative"},{"line_number":3000,"context_line":"                                   yielding during file read"},{"line_number":3001,"context_line":"        :param _quarantine_hook: 1-arg callable called when obj quarantined;"},{"line_number":3002,"context_line":"                                 the arg is the reason for quarantine."}],"source_content_type":"text/x-python","patch_set":11,"id":"b4633c57_e5f2ebdf","line":2999,"range":{"start_line":2999,"start_character":56,"end_line":2999,"end_character":65},"in_reply_to":"1457d442_81578c8a","updated":"2024-02-08 05:59:06.000000000","message":"Done","commit_id":"c5ac8600357b2cd22d61a075e4e13ee629052ca4"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e6c070e2e16e62230ea7429ff5162f872de3df81","unresolved":true,"context_lines":[{"line_number":2157,"context_line":""},{"line_number":2158,"context_line":"    def __iter__(self):"},{"line_number":2159,"context_line":"        return CooperativeIterator("},{"line_number":2160,"context_line":"            self._inner_iter(), period\u003dself._cooperative_period)"},{"line_number":2161,"context_line":""},{"line_number":2162,"context_line":"    def _inner_iter(self):"},{"line_number":2163,"context_line":"        \"\"\"Returns an iterator over the data file.\"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"588e48c6_59fde80d","line":2160,"updated":"2024-02-08 10:42:18.000000000","message":"much cleaner IMHO 😊","commit_id":"0696a6a3d8be58c7a9b56c088f136e21f4ea7c2e"}],"swift/obj/mem_diskfile.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"bbbf7457b8bc0b40205c886d6cc51a94af313276","unresolved":true,"context_lines":[{"line_number":426,"context_line":"        with self.open(current_time\u003dcurrent_time):"},{"line_number":427,"context_line":"            return self.get_metadata()"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"    def reader(self, keep_cache\u003dFalse, cooperative_period\u003dNone):"},{"line_number":430,"context_line":"        \"\"\""},{"line_number":431,"context_line":"        Return a swift.common.swob.Response class compatible \"app_iter\""},{"line_number":432,"context_line":"        object. The responsibility of closing the open file is passed to the"}],"source_content_type":"text/x-python","patch_set":16,"id":"49113ca6_aa3be468","line":429,"range":{"start_line":429,"start_character":58,"end_line":429,"end_character":62},"updated":"2024-02-27 00:24:24.000000000","message":"This should be a 0.","commit_id":"391c4f16c4786e30eee31a66db62ca6aa24c6377"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"f1e01641e51fc2bcf7dacaa64c1fb95cdba8a343","unresolved":false,"context_lines":[{"line_number":426,"context_line":"        with self.open(current_time\u003dcurrent_time):"},{"line_number":427,"context_line":"            return self.get_metadata()"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"    def reader(self, keep_cache\u003dFalse, cooperative_period\u003dNone):"},{"line_number":430,"context_line":"        \"\"\""},{"line_number":431,"context_line":"        Return a swift.common.swob.Response class compatible \"app_iter\""},{"line_number":432,"context_line":"        object. The responsibility of closing the open file is passed to the"}],"source_content_type":"text/x-python","patch_set":16,"id":"43cbcaf4_a9bee55f","line":429,"range":{"start_line":429,"start_character":58,"end_line":429,"end_character":62},"in_reply_to":"49113ca6_aa3be468","updated":"2024-02-27 00:27:04.000000000","message":"yes, it should be ``0``. thanks!","commit_id":"391c4f16c4786e30eee31a66db62ca6aa24c6377"}],"swift/obj/server.py":[{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"4bf341be51c95ef0e1372d263d1ba0f5b3b2274a","unresolved":true,"context_lines":[{"line_number":153,"context_line":"        self.keep_cache_slo_manifest \u003d \\"},{"line_number":154,"context_line":"            config_true_value(conf.get(\u0027keep_cache_slo_manifest\u0027, \u0027false\u0027))"},{"line_number":155,"context_line":"        self.file_read_cooperative_period \u003d config_true_value("},{"line_number":156,"context_line":"            conf.get(\u0027file_read_cooperative_period\u0027, \u00275\u0027))"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        default_allowed_headers \u003d \u0027\u0027\u0027"},{"line_number":159,"context_line":"            content-disposition,"}],"source_content_type":"text/x-python","patch_set":2,"id":"347b73b7_4584d184","line":156,"updated":"2023-10-06 05:07:48.000000000","message":"we can set it to a large value which effectively will disable cooperative yielding when we do the A/B test in prod.","commit_id":"47d5fd7fe32698b8233fd285ed546405d644435f"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"68f7815b083b5b266da30b9cfb47a6c1c00da9ee","unresolved":true,"context_lines":[{"line_number":153,"context_line":"        self.keep_cache_slo_manifest \u003d \\"},{"line_number":154,"context_line":"            config_true_value(conf.get(\u0027keep_cache_slo_manifest\u0027, \u0027false\u0027))"},{"line_number":155,"context_line":"        self.file_read_cooperative_period \u003d config_true_value("},{"line_number":156,"context_line":"            conf.get(\u0027file_read_cooperative_period\u0027, \u00275\u0027))"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        default_allowed_headers \u003d \u0027\u0027\u0027"},{"line_number":159,"context_line":"            content-disposition,"}],"source_content_type":"text/x-python","patch_set":2,"id":"b8dfaebe_3f74d798","line":156,"in_reply_to":"347b73b7_4584d184","updated":"2023-10-10 15:17:13.000000000","message":"we\u0027d normally expect an update to the example config in \n\n    etc/object-server.conf-sample\n\nI don\u0027t think \"file_read_*\" is the best prefix:\n\n1) \"file\" is implementation specific; in theory people (myself amoung them) have implemented non-xfs/filesystem based DiskFile\u0027s\n2) we don\u0027t prefix any other diskfile options with \"file\"; the most common pattern seems to be no prefix (there\u0027s no ambiguity between server/diskfile option names) - so my recommendation is just `[object-server]:cooperative_period`\n3) I guess we don\u0027t currently have a cooperative_period in write; we may need one and if we do I doubt it needs to be different than the value configured for read\n\nRE: default value \u0026 disable cooperative yielding\n\nI think THIS would be place to pull in the default from common.utils, probably document how to disable with something like `-1`","commit_id":"47d5fd7fe32698b8233fd285ed546405d644435f"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"7a049cbdf78048172f6f307d5ba3be67902d655d","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        self.keep_cache_slo_manifest \u003d \\"},{"line_number":154,"context_line":"            config_true_value(conf.get(\u0027keep_cache_slo_manifest\u0027, \u0027false\u0027))"},{"line_number":155,"context_line":"        self.file_read_cooperative_period \u003d config_true_value("},{"line_number":156,"context_line":"            conf.get(\u0027file_read_cooperative_period\u0027, \u00275\u0027))"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        default_allowed_headers \u003d \u0027\u0027\u0027"},{"line_number":159,"context_line":"            content-disposition,"}],"source_content_type":"text/x-python","patch_set":2,"id":"75ad6e8e_889b961b","line":156,"in_reply_to":"b8dfaebe_3f74d798","updated":"2023-10-11 05:18:19.000000000","message":"Done","commit_id":"47d5fd7fe32698b8233fd285ed546405d644435f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"df444564614a08b03d3586818deb337d02028c61","unresolved":true,"context_lines":[{"line_number":1341,"context_line":"        self.logger.txn_id \u003d req.headers.get(\u0027x-trans-id\u0027, None)"},{"line_number":1342,"context_line":""},{"line_number":1343,"context_line":"        if self.sleep_in_call:"},{"line_number":1344,"context_line":"            # Force to trampoline to get request timing metrics closer to"},{"line_number":1345,"context_line":"            # reflecting the time spent waiting in server accept queues."},{"line_number":1346,"context_line":"            sleep()"},{"line_number":1347,"context_line":""},{"line_number":1348,"context_line":"        if not check_utf8(wsgi_to_str(req.path_info), internal\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":7,"id":"81ffc748_e7743410","line":1345,"range":{"start_line":1344,"start_character":37,"end_line":1345,"end_character":71},"updated":"2023-10-16 15:08:30.000000000","message":"is this correct?\n\nor should it say \"get request timing metrics closer to the time spent since landing in a server accept queue\"?\n\nTotal time \u003d accept queue time + __call__ time\n\nor am I misunderstanding accept queue time?\n\nBut, regardless, this sleep is before we start timing the request with the timing_stats decorator, so how does it impact the metrics?","commit_id":"f5b9aed9bad55f3db7c86b0d4e763b57b908b9eb"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"0f15a23e186245a811a38d6cde0cccefb0f8b238","unresolved":false,"context_lines":[{"line_number":1341,"context_line":"        self.logger.txn_id \u003d req.headers.get(\u0027x-trans-id\u0027, None)"},{"line_number":1342,"context_line":""},{"line_number":1343,"context_line":"        if self.sleep_in_call:"},{"line_number":1344,"context_line":"            # Force to trampoline to get request timing metrics closer to"},{"line_number":1345,"context_line":"            # reflecting the time spent waiting in server accept queues."},{"line_number":1346,"context_line":"            sleep()"},{"line_number":1347,"context_line":""},{"line_number":1348,"context_line":"        if not check_utf8(wsgi_to_str(req.path_info), internal\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":7,"id":"60e5d1e6_65af47dd","line":1345,"range":{"start_line":1344,"start_character":37,"end_line":1345,"end_character":71},"in_reply_to":"81ffc748_e7743410","updated":"2024-02-02 16:45:13.000000000","message":"sleep_in_call is removed.","commit_id":"f5b9aed9bad55f3db7c86b0d4e763b57b908b9eb"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"82fe547d0eeeffb9ee721c32fe583b02d57060ee","unresolved":true,"context_lines":[{"line_number":1372,"context_line":"        if req.method in (\u0027PUT\u0027, \u0027DELETE\u0027):"},{"line_number":1373,"context_line":"            slow \u003d self.slow - trans_time"},{"line_number":1374,"context_line":"            if slow \u003e 0:"},{"line_number":1375,"context_line":"                sleep(slow)"},{"line_number":1376,"context_line":""},{"line_number":1377,"context_line":"        # To be able to zero-copy send the object, we need a few things."},{"line_number":1378,"context_line":"        # First, we have to be responding successfully to a GET, or else we\u0027re"}],"source_content_type":"text/x-python","patch_set":8,"id":"8bcc4388_4cdf2f27","line":1375,"updated":"2023-10-16 19:52:58.000000000","message":"I think there\u0027s a argument to be made that if we want timing_stats to be correct they should be implemented by wrapping `BaseStorageServer.__call__`\n\nWe\u0027d need some interface to pass information from the controller back out of the Application\u0027s call; probably WSGI envrion - could be an interesting little design challange.","commit_id":"b60b6dd7da008db476af36f9b06c57f26d4d63d5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e6c070e2e16e62230ea7429ff5162f872de3df81","unresolved":true,"context_lines":[{"line_number":152,"context_line":"            config_true_value(conf.get(\u0027keep_cache_private\u0027, \u0027false\u0027))"},{"line_number":153,"context_line":"        self.keep_cache_slo_manifest \u003d \\"},{"line_number":154,"context_line":"            config_true_value(conf.get(\u0027keep_cache_slo_manifest\u0027, \u0027false\u0027))"},{"line_number":155,"context_line":"        self.cooperative_period \u003d int(conf.get(\"cooperative_period\", -1))"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        default_allowed_headers \u003d \u0027\u0027\u0027"},{"line_number":158,"context_line":"            content-disposition,"}],"source_content_type":"text/x-python","patch_set":12,"id":"ee55f0ec_028aa7ad","line":155,"range":{"start_line":155,"start_character":69,"end_line":155,"end_character":71},"updated":"2024-02-08 10:42:18.000000000","message":"we should make this 0 now? -1 works of course, but it\u0027s less surprising for this value to match the documented default","commit_id":"0696a6a3d8be58c7a9b56c088f136e21f4ea7c2e"}],"test/unit/obj/test_server.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"68f7815b083b5b266da30b9cfb47a6c1c00da9ee","unresolved":true,"context_lines":[{"line_number":4357,"context_line":"        with mock.patch(\u0027swift.obj.diskfile.BaseDiskFile.reader\u0027, reader_mock):"},{"line_number":4358,"context_line":"            resp \u003d req.get_response(obj_controller)"},{"line_number":4359,"context_line":"            reader_mock.assert_called_with("},{"line_number":4360,"context_line":"                keep_cache\u003dTrue, cooperative_period\u003d5)"},{"line_number":4361,"context_line":"        self.assertEqual(resp.status_int, 200)"},{"line_number":4362,"context_line":"        etag \u003d \u0027\"%s\"\u0027 % md5(b\u0027VERIFY\u0027, usedforsecurity\u003dFalse).hexdigest()"},{"line_number":4363,"context_line":"        self.assertEqual(dict(resp.headers), {"}],"source_content_type":"text/x-python","patch_set":4,"id":"645e6117_b2e5a072","line":4360,"updated":"2023-10-10 15:17:13.000000000","message":"so this is telling us plainly this changes the default behavior.  I think that\u0027s the hope; but I wonder what will be easiest to land.","commit_id":"bf84f5b7f49704dfece946b5a91e9a5dfe16f006"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"7a049cbdf78048172f6f307d5ba3be67902d655d","unresolved":false,"context_lines":[{"line_number":4357,"context_line":"        with mock.patch(\u0027swift.obj.diskfile.BaseDiskFile.reader\u0027, reader_mock):"},{"line_number":4358,"context_line":"            resp \u003d req.get_response(obj_controller)"},{"line_number":4359,"context_line":"            reader_mock.assert_called_with("},{"line_number":4360,"context_line":"                keep_cache\u003dTrue, cooperative_period\u003d5)"},{"line_number":4361,"context_line":"        self.assertEqual(resp.status_int, 200)"},{"line_number":4362,"context_line":"        etag \u003d \u0027\"%s\"\u0027 % md5(b\u0027VERIFY\u0027, usedforsecurity\u003dFalse).hexdigest()"},{"line_number":4363,"context_line":"        self.assertEqual(dict(resp.headers), {"}],"source_content_type":"text/x-python","patch_set":4,"id":"eda38e4c_20cf0efb","line":4360,"in_reply_to":"645e6117_b2e5a072","updated":"2023-10-11 05:18:19.000000000","message":"changed the default to \u0027-1\u0027","commit_id":"bf84f5b7f49704dfece946b5a91e9a5dfe16f006"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"68f7815b083b5b266da30b9cfb47a6c1c00da9ee","unresolved":true,"context_lines":[{"line_number":4683,"context_line":"                            headers\u003d{\u0027Content-Type\u0027: \u0027application/x-test\u0027,"},{"line_number":4684,"context_line":"                                     \u0027X-Auth-Token\u0027: \u00272340lsdfhhjl02lxfjj\u0027})"},{"line_number":4685,"context_line":""},{"line_number":4686,"context_line":"        reader_mock \u003d mock.Mock(keep_cache\u003dFalse)"},{"line_number":4687,"context_line":"        with mock.patch(\u0027swift.obj.diskfile.BaseDiskFile.reader\u0027, reader_mock):"},{"line_number":4688,"context_line":"            resp \u003d req.get_response(obj_controller)"},{"line_number":4689,"context_line":"            reader_mock.assert_called_with("}],"source_content_type":"text/x-python","patch_set":4,"id":"435a749e_38bddb36","line":4686,"updated":"2023-10-10 15:17:13.000000000","message":"your instinct to write a new test is good!\n\nThere\u0027s a lot going on in this test to assert one layer of call plumbing; I wonder how we could assert something about the behavior we\u0027re trying to maintain instead of just the implementation?  TestCooperativeIterator asserts sleep was called a few times - I think that\u0027d be pretty good, and only requires mocking the built-in (which is much better IMHO than mocking a method on the UUT)","commit_id":"bf84f5b7f49704dfece946b5a91e9a5dfe16f006"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"7a049cbdf78048172f6f307d5ba3be67902d655d","unresolved":false,"context_lines":[{"line_number":4683,"context_line":"                            headers\u003d{\u0027Content-Type\u0027: \u0027application/x-test\u0027,"},{"line_number":4684,"context_line":"                                     \u0027X-Auth-Token\u0027: \u00272340lsdfhhjl02lxfjj\u0027})"},{"line_number":4685,"context_line":""},{"line_number":4686,"context_line":"        reader_mock \u003d mock.Mock(keep_cache\u003dFalse)"},{"line_number":4687,"context_line":"        with mock.patch(\u0027swift.obj.diskfile.BaseDiskFile.reader\u0027, reader_mock):"},{"line_number":4688,"context_line":"            resp \u003d req.get_response(obj_controller)"},{"line_number":4689,"context_line":"            reader_mock.assert_called_with("}],"source_content_type":"text/x-python","patch_set":4,"id":"82ec23ab_68a75748","line":4686,"in_reply_to":"435a749e_38bddb36","updated":"2023-10-11 05:18:19.000000000","message":"Done","commit_id":"bf84f5b7f49704dfece946b5a91e9a5dfe16f006"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"68f7815b083b5b266da30b9cfb47a6c1c00da9ee","unresolved":true,"context_lines":[{"line_number":4687,"context_line":"        with mock.patch(\u0027swift.obj.diskfile.BaseDiskFile.reader\u0027, reader_mock):"},{"line_number":4688,"context_line":"            resp \u003d req.get_response(obj_controller)"},{"line_number":4689,"context_line":"            reader_mock.assert_called_with("},{"line_number":4690,"context_line":"                keep_cache\u003dFalse, cooperative_period\u003d999)"},{"line_number":4691,"context_line":"        self.assertEqual(resp.status_int, 200)"},{"line_number":4692,"context_line":"        etag \u003d \u0027\"%s\"\u0027 % md5(b\u0027VERIFY\u0027, usedforsecurity\u003dFalse).hexdigest()"},{"line_number":4693,"context_line":"        self.assertEqual(dict(resp.headers), {"}],"source_content_type":"text/x-python","patch_set":4,"id":"e2f91179_649063f7","line":4690,"updated":"2023-10-10 15:17:13.000000000","message":"style nit: you can de-dent this\n\nthe read_mock var will exists beyond the life of the with block; but the patching will only be in effect while your in context.  It probably doesn\u0027t matter here, but can make a huge difference when your calling asserts on built-in mocks (and the test infra calls the patched built-in!)","commit_id":"bf84f5b7f49704dfece946b5a91e9a5dfe16f006"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"7a049cbdf78048172f6f307d5ba3be67902d655d","unresolved":false,"context_lines":[{"line_number":4687,"context_line":"        with mock.patch(\u0027swift.obj.diskfile.BaseDiskFile.reader\u0027, reader_mock):"},{"line_number":4688,"context_line":"            resp \u003d req.get_response(obj_controller)"},{"line_number":4689,"context_line":"            reader_mock.assert_called_with("},{"line_number":4690,"context_line":"                keep_cache\u003dFalse, cooperative_period\u003d999)"},{"line_number":4691,"context_line":"        self.assertEqual(resp.status_int, 200)"},{"line_number":4692,"context_line":"        etag \u003d \u0027\"%s\"\u0027 % md5(b\u0027VERIFY\u0027, usedforsecurity\u003dFalse).hexdigest()"},{"line_number":4693,"context_line":"        self.assertEqual(dict(resp.headers), {"}],"source_content_type":"text/x-python","patch_set":4,"id":"03cb0ddf_794175f5","line":4690,"in_reply_to":"e2f91179_649063f7","updated":"2023-10-11 05:18:19.000000000","message":"Done","commit_id":"bf84f5b7f49704dfece946b5a91e9a5dfe16f006"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"df444564614a08b03d3586818deb337d02028c61","unresolved":true,"context_lines":[{"line_number":4684,"context_line":"        req \u003d Request.blank(\u0027/sda1/p/a/c/o\u0027,"},{"line_number":4685,"context_line":"                            headers\u003d{\u0027Content-Type\u0027: \u0027application/x-test\u0027,"},{"line_number":4686,"context_line":"                                     \u0027X-Auth-Token\u0027: \u00272340lsdfhhjl02lxfjj\u0027})"},{"line_number":4687,"context_line":"        reader_mock \u003d mock.Mock(keep_cache\u003dFalse)"},{"line_number":4688,"context_line":"        with mock.patch(\u0027swift.obj.diskfile.BaseDiskFile.reader\u0027, reader_mock):"},{"line_number":4689,"context_line":"            resp \u003d req.get_response(obj_controller)"},{"line_number":4690,"context_line":"        reader_mock.assert_called_with(keep_cache\u003dFalse, cooperative_period\u003d99)"}],"source_content_type":"text/x-python","patch_set":7,"id":"86eaf5d3_7efd9fe0","line":4687,"range":{"start_line":4687,"start_character":32,"end_line":4687,"end_character":48},"updated":"2023-10-16 15:08:30.000000000","message":"I\u0027m not sure this is doing anything?\n\ncan it just be:\n\n```\nwith mock.patch(\u0027swift.obj.diskfile.BaseDiskFile.reader\u0027) as reader_mock\"\n```\n\n?","commit_id":"f5b9aed9bad55f3db7c86b0d4e763b57b908b9eb"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"696efd7a267cb3e29e416c414bacd52aebe54c7b","unresolved":false,"context_lines":[{"line_number":4684,"context_line":"        req \u003d Request.blank(\u0027/sda1/p/a/c/o\u0027,"},{"line_number":4685,"context_line":"                            headers\u003d{\u0027Content-Type\u0027: \u0027application/x-test\u0027,"},{"line_number":4686,"context_line":"                                     \u0027X-Auth-Token\u0027: \u00272340lsdfhhjl02lxfjj\u0027})"},{"line_number":4687,"context_line":"        reader_mock \u003d mock.Mock(keep_cache\u003dFalse)"},{"line_number":4688,"context_line":"        with mock.patch(\u0027swift.obj.diskfile.BaseDiskFile.reader\u0027, reader_mock):"},{"line_number":4689,"context_line":"            resp \u003d req.get_response(obj_controller)"},{"line_number":4690,"context_line":"        reader_mock.assert_called_with(keep_cache\u003dFalse, cooperative_period\u003d99)"}],"source_content_type":"text/x-python","patch_set":7,"id":"c09486ef_7a786bb7","line":4687,"range":{"start_line":4687,"start_character":32,"end_line":4687,"end_character":48},"in_reply_to":"86eaf5d3_7efd9fe0","updated":"2024-02-05 04:57:38.000000000","message":"Done","commit_id":"f5b9aed9bad55f3db7c86b0d4e763b57b908b9eb"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"df444564614a08b03d3586818deb337d02028c61","unresolved":true,"context_lines":[{"line_number":4697,"context_line":"            conf, logger\u003dself.logger)"},{"line_number":4698,"context_line":"        obj_controller.bytes_per_sync \u003d 1"},{"line_number":4699,"context_line":""},{"line_number":4700,"context_line":"        timestamp \u003d normalize_timestamp(time())"},{"line_number":4701,"context_line":"        req \u003d Request.blank(\u0027/sda1/p/a/c/o\u0027, environ\u003d{\u0027REQUEST_METHOD\u0027: \u0027PUT\u0027},"},{"line_number":4702,"context_line":"                            headers\u003d{\u0027X-Timestamp\u0027: timestamp,"},{"line_number":4703,"context_line":"                                     \u0027Content-Type\u0027: \u0027application/x-test\u0027})"},{"line_number":4704,"context_line":"        req.body \u003d b\u00277 bytes\u0027"},{"line_number":4705,"context_line":"        resp \u003d req.get_response(obj_controller)"},{"line_number":4706,"context_line":"        self.assertEqual(resp.status_int, 201)"},{"line_number":4707,"context_line":""},{"line_number":4708,"context_line":"        req \u003d Request.blank(\u0027/sda1/p/a/c/o\u0027,"},{"line_number":4709,"context_line":"                            environ\u003d{\u0027REQUEST_METHOD\u0027: \u0027GET\u0027},"}],"source_content_type":"text/x-python","patch_set":7,"id":"4c634032_7eb4581f","line":4706,"range":{"start_line":4700,"start_character":1,"end_line":4706,"end_character":46},"updated":"2023-10-16 15:08:30.000000000","message":"not sure the repeated PUT is needed","commit_id":"f5b9aed9bad55f3db7c86b0d4e763b57b908b9eb"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"696efd7a267cb3e29e416c414bacd52aebe54c7b","unresolved":false,"context_lines":[{"line_number":4697,"context_line":"            conf, logger\u003dself.logger)"},{"line_number":4698,"context_line":"        obj_controller.bytes_per_sync \u003d 1"},{"line_number":4699,"context_line":""},{"line_number":4700,"context_line":"        timestamp \u003d normalize_timestamp(time())"},{"line_number":4701,"context_line":"        req \u003d Request.blank(\u0027/sda1/p/a/c/o\u0027, environ\u003d{\u0027REQUEST_METHOD\u0027: \u0027PUT\u0027},"},{"line_number":4702,"context_line":"                            headers\u003d{\u0027X-Timestamp\u0027: timestamp,"},{"line_number":4703,"context_line":"                                     \u0027Content-Type\u0027: \u0027application/x-test\u0027})"},{"line_number":4704,"context_line":"        req.body \u003d b\u00277 bytes\u0027"},{"line_number":4705,"context_line":"        resp \u003d req.get_response(obj_controller)"},{"line_number":4706,"context_line":"        self.assertEqual(resp.status_int, 201)"},{"line_number":4707,"context_line":""},{"line_number":4708,"context_line":"        req \u003d Request.blank(\u0027/sda1/p/a/c/o\u0027,"},{"line_number":4709,"context_line":"                            environ\u003d{\u0027REQUEST_METHOD\u0027: \u0027GET\u0027},"}],"source_content_type":"text/x-python","patch_set":7,"id":"20b1d072_bb02eb88","line":4706,"range":{"start_line":4700,"start_character":1,"end_line":4706,"end_character":46},"in_reply_to":"4c634032_7eb4581f","updated":"2024-02-05 04:57:38.000000000","message":"no, they are not needed.","commit_id":"f5b9aed9bad55f3db7c86b0d4e763b57b908b9eb"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"df444564614a08b03d3586818deb337d02028c61","unresolved":true,"context_lines":[{"line_number":4713,"context_line":"            self.assertEqual(resp.status_int, 206)"},{"line_number":4714,"context_line":"            self.assertEqual(\u0027bytes 1-6/7\u0027, resp.headers.get(\u0027Content-Range\u0027))"},{"line_number":4715,"context_line":"            self.assertEqual(b\u0027 bytes\u0027, resp.body)"},{"line_number":4716,"context_line":"        self.assertEqual(1, mock_sleep.call_count)"},{"line_number":4717,"context_line":""},{"line_number":4718,"context_line":"        # Test DiskFile reader actually sleeps when reading chunks. When"},{"line_number":4719,"context_line":"        # cooperative_period is 0, disk reader sleeps once before each next()."}],"source_content_type":"text/x-python","patch_set":7,"id":"b1b96038_5d445ce2","line":4716,"updated":"2023-10-16 15:08:30.000000000","message":"It\u0027s unfortunate that this sleep may be after the last bytes have been yielded. But I guess that\u0027s also the case elsewhere that we use CooperativeIterator.","commit_id":"f5b9aed9bad55f3db7c86b0d4e763b57b908b9eb"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"0f15a23e186245a811a38d6cde0cccefb0f8b238","unresolved":false,"context_lines":[{"line_number":4713,"context_line":"            self.assertEqual(resp.status_int, 206)"},{"line_number":4714,"context_line":"            self.assertEqual(\u0027bytes 1-6/7\u0027, resp.headers.get(\u0027Content-Range\u0027))"},{"line_number":4715,"context_line":"            self.assertEqual(b\u0027 bytes\u0027, resp.body)"},{"line_number":4716,"context_line":"        self.assertEqual(1, mock_sleep.call_count)"},{"line_number":4717,"context_line":""},{"line_number":4718,"context_line":"        # Test DiskFile reader actually sleeps when reading chunks. When"},{"line_number":4719,"context_line":"        # cooperative_period is 0, disk reader sleeps once before each next()."}],"source_content_type":"text/x-python","patch_set":7,"id":"c2f68db2_588331e9","line":4716,"in_reply_to":"b1b96038_5d445ce2","updated":"2024-02-02 16:45:13.000000000","message":"Acknowledged","commit_id":"f5b9aed9bad55f3db7c86b0d4e763b57b908b9eb"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"df444564614a08b03d3586818deb337d02028c61","unresolved":true,"context_lines":[{"line_number":4716,"context_line":"        self.assertEqual(1, mock_sleep.call_count)"},{"line_number":4717,"context_line":""},{"line_number":4718,"context_line":"        # Test DiskFile reader actually sleeps when reading chunks. When"},{"line_number":4719,"context_line":"        # cooperative_period is 0, disk reader sleeps once before each next()."},{"line_number":4720,"context_line":"        conf[\u0027cooperative_period\u0027] \u003d \u00270\u0027"},{"line_number":4721,"context_line":"        obj_controller \u003d object_server.ObjectController("},{"line_number":4722,"context_line":"            conf, logger\u003dself.logger)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5b963f3e_a70c98fc","line":4719,"range":{"start_line":4719,"start_character":59,"end_line":4719,"end_character":65},"updated":"2023-10-16 15:08:30.000000000","message":"OIC! nit: please emphasise *after* and *before* to help me next time I read these comments 😊","commit_id":"f5b9aed9bad55f3db7c86b0d4e763b57b908b9eb"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"0f15a23e186245a811a38d6cde0cccefb0f8b238","unresolved":false,"context_lines":[{"line_number":4716,"context_line":"        self.assertEqual(1, mock_sleep.call_count)"},{"line_number":4717,"context_line":""},{"line_number":4718,"context_line":"        # Test DiskFile reader actually sleeps when reading chunks. When"},{"line_number":4719,"context_line":"        # cooperative_period is 0, disk reader sleeps once before each next()."},{"line_number":4720,"context_line":"        conf[\u0027cooperative_period\u0027] \u003d \u00270\u0027"},{"line_number":4721,"context_line":"        obj_controller \u003d object_server.ObjectController("},{"line_number":4722,"context_line":"            conf, logger\u003dself.logger)"}],"source_content_type":"text/x-python","patch_set":7,"id":"420e00e2_306d7322","line":4719,"range":{"start_line":4719,"start_character":59,"end_line":4719,"end_character":65},"in_reply_to":"5b963f3e_a70c98fc","updated":"2024-02-02 16:45:13.000000000","message":"Done","commit_id":"f5b9aed9bad55f3db7c86b0d4e763b57b908b9eb"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"82fe547d0eeeffb9ee721c32fe583b02d57060ee","unresolved":true,"context_lines":[{"line_number":4780,"context_line":"                now[0] +\u003d 1"},{"line_number":4781,"context_line":"                return now[0]"},{"line_number":4782,"context_line":""},{"line_number":4783,"context_line":"            def mock_sleep():"},{"line_number":4784,"context_line":"                sleep_calls[0] +\u003d 1"},{"line_number":4785,"context_line":"                now[0] +\u003d 12345"},{"line_number":4786,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"a2148568_b0aa88bf","line":4783,"updated":"2023-10-16 19:52:58.000000000","message":"i think sleep normally takes a `seconds\u003dNone` parameter","commit_id":"b60b6dd7da008db476af36f9b06c57f26d4d63d5"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"0f15a23e186245a811a38d6cde0cccefb0f8b238","unresolved":false,"context_lines":[{"line_number":4780,"context_line":"                now[0] +\u003d 1"},{"line_number":4781,"context_line":"                return now[0]"},{"line_number":4782,"context_line":""},{"line_number":4783,"context_line":"            def mock_sleep():"},{"line_number":4784,"context_line":"                sleep_calls[0] +\u003d 1"},{"line_number":4785,"context_line":"                now[0] +\u003d 12345"},{"line_number":4786,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"0d455b22_5c44e3aa","line":4783,"in_reply_to":"a2148568_b0aa88bf","updated":"2024-02-02 16:45:13.000000000","message":"test removed.","commit_id":"b60b6dd7da008db476af36f9b06c57f26d4d63d5"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"82fe547d0eeeffb9ee721c32fe583b02d57060ee","unresolved":true,"context_lines":[{"line_number":4796,"context_line":"                with mock.patch(\u0027swift.common.utils.sleep\u0027, mock_sleep):"},{"line_number":4797,"context_line":"                    with mock.patch(\u0027swift.obj.server.time.time\u0027, fake_time):"},{"line_number":4798,"context_line":"                        with mock.patch.object(obj_controller,"},{"line_number":4799,"context_line":"                                               \u0027logger\u0027) as mock_logger:"},{"line_number":4800,"context_line":"                            req.get_response(obj_controller)"},{"line_number":4801,"context_line":""},{"line_number":4802,"context_line":"            self.assertEqual(1 if sleep_in_call else 0, sleep_calls[0])"}],"source_content_type":"text/x-python","patch_set":8,"id":"30275877_e8a7f1d5","line":4799,"updated":"2023-10-16 19:52:58.000000000","message":"please use a compound with statement:\n\nhttps://docs.python.org/3/reference/compound_stmts.html#the-with-statement","commit_id":"b60b6dd7da008db476af36f9b06c57f26d4d63d5"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"0f15a23e186245a811a38d6cde0cccefb0f8b238","unresolved":false,"context_lines":[{"line_number":4796,"context_line":"                with mock.patch(\u0027swift.common.utils.sleep\u0027, mock_sleep):"},{"line_number":4797,"context_line":"                    with mock.patch(\u0027swift.obj.server.time.time\u0027, fake_time):"},{"line_number":4798,"context_line":"                        with mock.patch.object(obj_controller,"},{"line_number":4799,"context_line":"                                               \u0027logger\u0027) as mock_logger:"},{"line_number":4800,"context_line":"                            req.get_response(obj_controller)"},{"line_number":4801,"context_line":""},{"line_number":4802,"context_line":"            self.assertEqual(1 if sleep_in_call else 0, sleep_calls[0])"}],"source_content_type":"text/x-python","patch_set":8,"id":"7235e471_8aef84ae","line":4799,"in_reply_to":"30275877_e8a7f1d5","updated":"2024-02-02 16:45:13.000000000","message":"Acknowledged","commit_id":"b60b6dd7da008db476af36f9b06c57f26d4d63d5"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"82fe547d0eeeffb9ee721c32fe583b02d57060ee","unresolved":true,"context_lines":[{"line_number":4799,"context_line":"                                               \u0027logger\u0027) as mock_logger:"},{"line_number":4800,"context_line":"                            req.get_response(obj_controller)"},{"line_number":4801,"context_line":""},{"line_number":4802,"context_line":"            self.assertEqual(1 if sleep_in_call else 0, sleep_calls[0])"},{"line_number":4803,"context_line":"            mock_get_log_line.assert_called_once()"},{"line_number":4804,"context_line":"            log_trans_time \u003d mock_get_log_line.call_args_list[0][0][2]"},{"line_number":4805,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"d4e91012_b2a8d270","line":4802,"updated":"2023-10-16 19:52:58.000000000","message":"I think this assert is doing most of the work","commit_id":"b60b6dd7da008db476af36f9b06c57f26d4d63d5"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"0f15a23e186245a811a38d6cde0cccefb0f8b238","unresolved":false,"context_lines":[{"line_number":4799,"context_line":"                                               \u0027logger\u0027) as mock_logger:"},{"line_number":4800,"context_line":"                            req.get_response(obj_controller)"},{"line_number":4801,"context_line":""},{"line_number":4802,"context_line":"            self.assertEqual(1 if sleep_in_call else 0, sleep_calls[0])"},{"line_number":4803,"context_line":"            mock_get_log_line.assert_called_once()"},{"line_number":4804,"context_line":"            log_trans_time \u003d mock_get_log_line.call_args_list[0][0][2]"},{"line_number":4805,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"f5fe7b2a_d211baed","line":4802,"in_reply_to":"d4e91012_b2a8d270","updated":"2024-02-02 16:45:13.000000000","message":"Done","commit_id":"b60b6dd7da008db476af36f9b06c57f26d4d63d5"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"82fe547d0eeeffb9ee721c32fe583b02d57060ee","unresolved":true,"context_lines":[{"line_number":4805,"context_line":""},{"line_number":4806,"context_line":"            mock_logger.timing_since.assert_called_once()"},{"line_number":4807,"context_line":"            stats_start_time \u003d mock_logger.timing_since.call_args_list[0][0][1]"},{"line_number":4808,"context_line":"            stats_elapsed_time \u003d fake_time() - stats_start_time"},{"line_number":4809,"context_line":"            return log_trans_time, stats_elapsed_time"},{"line_number":4810,"context_line":""},{"line_number":4811,"context_line":"        for method in (\u0027GET\u0027, \u0027HEAD\u0027, \u0027DELETE\u0027, \u0027PUT\u0027, \u0027POST\u0027, \u0027REPLICATE\u0027):"}],"source_content_type":"text/x-python","patch_set":8,"id":"cbce7e8c_94fae0c9","line":4808,"updated":"2023-10-16 19:52:58.000000000","message":"what\u0027s the significance of calling fake_time again here - it seems like it\u0027s going to increment now[0] again?","commit_id":"b60b6dd7da008db476af36f9b06c57f26d4d63d5"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"0f15a23e186245a811a38d6cde0cccefb0f8b238","unresolved":false,"context_lines":[{"line_number":4805,"context_line":""},{"line_number":4806,"context_line":"            mock_logger.timing_since.assert_called_once()"},{"line_number":4807,"context_line":"            stats_start_time \u003d mock_logger.timing_since.call_args_list[0][0][1]"},{"line_number":4808,"context_line":"            stats_elapsed_time \u003d fake_time() - stats_start_time"},{"line_number":4809,"context_line":"            return log_trans_time, stats_elapsed_time"},{"line_number":4810,"context_line":""},{"line_number":4811,"context_line":"        for method in (\u0027GET\u0027, \u0027HEAD\u0027, \u0027DELETE\u0027, \u0027PUT\u0027, \u0027POST\u0027, \u0027REPLICATE\u0027):"}],"source_content_type":"text/x-python","patch_set":8,"id":"38391cc5_c69651e2","line":4808,"in_reply_to":"cbce7e8c_94fae0c9","updated":"2024-02-02 16:45:13.000000000","message":"test removed.","commit_id":"b60b6dd7da008db476af36f9b06c57f26d4d63d5"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"82fe547d0eeeffb9ee721c32fe583b02d57060ee","unresolved":true,"context_lines":[{"line_number":4814,"context_line":"            self.assertLess(stats_time, 12345)"},{"line_number":4815,"context_line":"            log_time, stats_time \u003d do_call(method, True)"},{"line_number":4816,"context_line":"            self.assertGreater(log_time, 12345)"},{"line_number":4817,"context_line":"            self.assertGreater(stats_time, 12345)"},{"line_number":4818,"context_line":""},{"line_number":4819,"context_line":"    @mock.patch(\"time.time\", mock_time)"},{"line_number":4820,"context_line":"    def test_DELETE(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"686c4929_2adafcdb","line":4817,"updated":"2023-10-16 19:52:58.000000000","message":"it\u0027s weird for me to see the sleep_calls[0] assert in the \"do_call\" helper and the reset here on the outside\n\nI think I\u0027d prefer to see the \"do_call\" responsible only for the crank turning and have all the asserts on the outside (you could return sleep_calls)","commit_id":"b60b6dd7da008db476af36f9b06c57f26d4d63d5"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"0f15a23e186245a811a38d6cde0cccefb0f8b238","unresolved":false,"context_lines":[{"line_number":4814,"context_line":"            self.assertLess(stats_time, 12345)"},{"line_number":4815,"context_line":"            log_time, stats_time \u003d do_call(method, True)"},{"line_number":4816,"context_line":"            self.assertGreater(log_time, 12345)"},{"line_number":4817,"context_line":"            self.assertGreater(stats_time, 12345)"},{"line_number":4818,"context_line":""},{"line_number":4819,"context_line":"    @mock.patch(\"time.time\", mock_time)"},{"line_number":4820,"context_line":"    def test_DELETE(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"8d0e572e_bed3b3bb","line":4817,"in_reply_to":"686c4929_2adafcdb","updated":"2024-02-02 16:45:13.000000000","message":"test case removed.","commit_id":"b60b6dd7da008db476af36f9b06c57f26d4d63d5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"17a317004ab7911b613976d699b870f8c531f493","unresolved":true,"context_lines":[{"line_number":4661,"context_line":"                \u0027cooperative_period\u0027: \u002799\u0027}"},{"line_number":4662,"context_line":"        obj_controller \u003d object_server.ObjectController("},{"line_number":4663,"context_line":"            conf, logger\u003dself.logger)"},{"line_number":4664,"context_line":"        obj_controller.bytes_per_sync \u003d 1"},{"line_number":4665,"context_line":""},{"line_number":4666,"context_line":"        timestamp \u003d normalize_timestamp(time())"},{"line_number":4667,"context_line":"        req \u003d Request.blank(\u0027/sda1/p/a/c/o\u0027, environ\u003d{\u0027REQUEST_METHOD\u0027: \u0027PUT\u0027},"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff6a802a_4379ccda","line":4664,"updated":"2024-02-07 12:56:38.000000000","message":"I can\u0027t find this attribute for ObjectController, only on BaseDiskFileManager, and I\u0027m not sure it\u0027s relevant\n\nIt would be interesting to vary disk_chunk_size https://paste.openstack.org/show/bnR1nvYcw06u2t2c2UB8/","commit_id":"c5ac8600357b2cd22d61a075e4e13ee629052ca4"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"585a5185a0775858c2bd19bc553e9f8ed4458df6","unresolved":false,"context_lines":[{"line_number":4661,"context_line":"                \u0027cooperative_period\u0027: \u002799\u0027}"},{"line_number":4662,"context_line":"        obj_controller \u003d object_server.ObjectController("},{"line_number":4663,"context_line":"            conf, logger\u003dself.logger)"},{"line_number":4664,"context_line":"        obj_controller.bytes_per_sync \u003d 1"},{"line_number":4665,"context_line":""},{"line_number":4666,"context_line":"        timestamp \u003d normalize_timestamp(time())"},{"line_number":4667,"context_line":"        req \u003d Request.blank(\u0027/sda1/p/a/c/o\u0027, environ\u003d{\u0027REQUEST_METHOD\u0027: \u0027PUT\u0027},"}],"source_content_type":"text/x-python","patch_set":11,"id":"59820d06_34e351c3","line":4664,"in_reply_to":"ff6a802a_4379ccda","updated":"2024-02-08 05:59:06.000000000","message":"Done","commit_id":"c5ac8600357b2cd22d61a075e4e13ee629052ca4"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"17a317004ab7911b613976d699b870f8c531f493","unresolved":true,"context_lines":[{"line_number":4696,"context_line":"            self.assertEqual(resp.status_int, 206)"},{"line_number":4697,"context_line":"            self.assertEqual(\u0027bytes 1-6/7\u0027, resp.headers.get(\u0027Content-Range\u0027))"},{"line_number":4698,"context_line":"            self.assertEqual(b\u0027 bytes\u0027, resp.body)"},{"line_number":4699,"context_line":"        self.assertEqual(1, mock_sleep.call_count)"},{"line_number":4700,"context_line":""},{"line_number":4701,"context_line":"        # Test DiskFile reader actually sleeps when reading chunks. When"},{"line_number":4702,"context_line":"        # cooperative_period is 0, disk reader sleeps once BEFORE each next()."}],"source_content_type":"text/x-python","patch_set":11,"id":"9c6afef6_a01a2882","line":4699,"updated":"2024-02-07 12:56:38.000000000","message":"ok, this sleep is after the whole body is yielded but before the StopIteration","commit_id":"c5ac8600357b2cd22d61a075e4e13ee629052ca4"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"585a5185a0775858c2bd19bc553e9f8ed4458df6","unresolved":false,"context_lines":[{"line_number":4696,"context_line":"            self.assertEqual(resp.status_int, 206)"},{"line_number":4697,"context_line":"            self.assertEqual(\u0027bytes 1-6/7\u0027, resp.headers.get(\u0027Content-Range\u0027))"},{"line_number":4698,"context_line":"            self.assertEqual(b\u0027 bytes\u0027, resp.body)"},{"line_number":4699,"context_line":"        self.assertEqual(1, mock_sleep.call_count)"},{"line_number":4700,"context_line":""},{"line_number":4701,"context_line":"        # Test DiskFile reader actually sleeps when reading chunks. When"},{"line_number":4702,"context_line":"        # cooperative_period is 0, disk reader sleeps once BEFORE each next()."}],"source_content_type":"text/x-python","patch_set":11,"id":"26564103_46b8bb21","line":4699,"in_reply_to":"9c6afef6_a01a2882","updated":"2024-02-08 05:59:06.000000000","message":"Acknowledged","commit_id":"c5ac8600357b2cd22d61a075e4e13ee629052ca4"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"17a317004ab7911b613976d699b870f8c531f493","unresolved":true,"context_lines":[{"line_number":4699,"context_line":"        self.assertEqual(1, mock_sleep.call_count)"},{"line_number":4700,"context_line":""},{"line_number":4701,"context_line":"        # Test DiskFile reader actually sleeps when reading chunks. When"},{"line_number":4702,"context_line":"        # cooperative_period is 0, disk reader sleeps once BEFORE each next()."},{"line_number":4703,"context_line":"        conf[\u0027cooperative_period\u0027] \u003d \u00270\u0027"},{"line_number":4704,"context_line":"        obj_controller \u003d object_server.ObjectController("},{"line_number":4705,"context_line":"            conf, logger\u003dself.logger)"}],"source_content_type":"text/x-python","patch_set":11,"id":"cc805aee_19ea9d65","line":4702,"range":{"start_line":4702,"start_character":35,"end_line":4702,"end_character":77},"updated":"2024-02-07 12:56:38.000000000","message":"is this a behavior we actually *want*? It is a subtlety that is not described in the sample config, and we could fix it https://review.opendev.org/c/openstack/swift/+/908300","commit_id":"c5ac8600357b2cd22d61a075e4e13ee629052ca4"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"585a5185a0775858c2bd19bc553e9f8ed4458df6","unresolved":false,"context_lines":[{"line_number":4699,"context_line":"        self.assertEqual(1, mock_sleep.call_count)"},{"line_number":4700,"context_line":""},{"line_number":4701,"context_line":"        # Test DiskFile reader actually sleeps when reading chunks. When"},{"line_number":4702,"context_line":"        # cooperative_period is 0, disk reader sleeps once BEFORE each next()."},{"line_number":4703,"context_line":"        conf[\u0027cooperative_period\u0027] \u003d \u00270\u0027"},{"line_number":4704,"context_line":"        obj_controller \u003d object_server.ObjectController("},{"line_number":4705,"context_line":"            conf, logger\u003dself.logger)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ab58ff54_5bb0ed1c","line":4702,"range":{"start_line":4702,"start_character":35,"end_line":4702,"end_character":77},"in_reply_to":"cc805aee_19ea9d65","updated":"2024-02-08 05:59:06.000000000","message":"Acknowledged","commit_id":"c5ac8600357b2cd22d61a075e4e13ee629052ca4"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"17a317004ab7911b613976d699b870f8c531f493","unresolved":true,"context_lines":[{"line_number":4729,"context_line":"            self.assertEqual(resp.status_int, 206)"},{"line_number":4730,"context_line":"            self.assertEqual(\u0027bytes 1-6/7\u0027, resp.headers.get(\u0027Content-Range\u0027))"},{"line_number":4731,"context_line":"            self.assertEqual(b\u0027 bytes\u0027, resp.body)"},{"line_number":4732,"context_line":"        self.assertFalse(mock_sleep.called)"},{"line_number":4733,"context_line":""},{"line_number":4734,"context_line":"    @mock.patch(\"time.time\", mock_time)"},{"line_number":4735,"context_line":"    def test_DELETE(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"d00f6d22_6c63c046","line":4732,"updated":"2024-02-07 12:56:38.000000000","message":"I reverted changes and tests failed 👍","commit_id":"c5ac8600357b2cd22d61a075e4e13ee629052ca4"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"585a5185a0775858c2bd19bc553e9f8ed4458df6","unresolved":false,"context_lines":[{"line_number":4729,"context_line":"            self.assertEqual(resp.status_int, 206)"},{"line_number":4730,"context_line":"            self.assertEqual(\u0027bytes 1-6/7\u0027, resp.headers.get(\u0027Content-Range\u0027))"},{"line_number":4731,"context_line":"            self.assertEqual(b\u0027 bytes\u0027, resp.body)"},{"line_number":4732,"context_line":"        self.assertFalse(mock_sleep.called)"},{"line_number":4733,"context_line":""},{"line_number":4734,"context_line":"    @mock.patch(\"time.time\", mock_time)"},{"line_number":4735,"context_line":"    def test_DELETE(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"ddd10b86_48393bcd","line":4732,"in_reply_to":"d00f6d22_6c63c046","updated":"2024-02-08 05:59:06.000000000","message":"Acknowledged","commit_id":"c5ac8600357b2cd22d61a075e4e13ee629052ca4"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e6c070e2e16e62230ea7429ff5162f872de3df81","unresolved":true,"context_lines":[{"line_number":4347,"context_line":"        with mock.patch(\u0027swift.obj.diskfile.BaseDiskFile.reader\u0027, reader_mock):"},{"line_number":4348,"context_line":"            resp \u003d req.get_response(obj_controller)"},{"line_number":4349,"context_line":"            reader_mock.assert_called_with("},{"line_number":4350,"context_line":"                keep_cache\u003dTrue, cooperative_period\u003d-1)"},{"line_number":4351,"context_line":"        self.assertEqual(resp.status_int, 200)"},{"line_number":4352,"context_line":"        etag \u003d \u0027\"%s\"\u0027 % md5(b\u0027VERIFY\u0027, usedforsecurity\u003dFalse).hexdigest()"},{"line_number":4353,"context_line":"        self.assertEqual(dict(resp.headers), {"}],"source_content_type":"text/x-python","patch_set":12,"id":"c5b8f17c_f2f5d3aa","line":4350,"range":{"start_line":4350,"start_character":52,"end_line":4350,"end_character":54},"updated":"2024-02-08 10:42:18.000000000","message":"0","commit_id":"0696a6a3d8be58c7a9b56c088f136e21f4ea7c2e"}]}
