)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d52bbe5393325aff41a350c15c65f5a4b81ee97a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"e94b3a11_3fee952e","updated":"2025-10-10 15:24:59.000000000","message":"Thank you Dan for the review, added inline answers.","commit_id":"a53386b1a98e4403a04421ea834cd629063e775f"}],"specs/2026.1/approved/glance/duplicate-downloads.rst":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d234908aa74ae115897e753a7d29989a4b0958c1","unresolved":true,"context_lines":[{"line_number":129,"context_line":"**Solution 1: Fix Race Condition with Coordination**"},{"line_number":130,"context_line":"Add proper coordination mechanism to prevent concurrent writes to the same"},{"line_number":131,"context_line":"cache file. This ensures only one request can write to the cache at a time,"},{"line_number":132,"context_line":"eliminating the race condition and data corruption."},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"**Solution 2: Optimize with Chunked Caching (Optional Enhancement)**"},{"line_number":135,"context_line":"For improved performance and resumable downloads, implement chunked caching"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9955d96f_2847a0ff","line":132,"updated":"2025-10-10 14:35:33.000000000","message":"Are you suggesting tight interleaving such that we have one cache file being built and two different workers will be able to write data to that file? If so, how are you going to coordinate who gets to write a given range? It seems to me much safer to just say \"worker 2 won, so they will cache the whole file while worker 1 waits\". Is that the proposal?","commit_id":"a53386b1a98e4403a04421ea834cd629063e775f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d52bbe5393325aff41a350c15c65f5a4b81ee97a","unresolved":true,"context_lines":[{"line_number":129,"context_line":"**Solution 1: Fix Race Condition with Coordination**"},{"line_number":130,"context_line":"Add proper coordination mechanism to prevent concurrent writes to the same"},{"line_number":131,"context_line":"cache file. This ensures only one request can write to the cache at a time,"},{"line_number":132,"context_line":"eliminating the race condition and data corruption."},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"**Solution 2: Optimize with Chunked Caching (Optional Enhancement)**"},{"line_number":135,"context_line":"For improved performance and resumable downloads, implement chunked caching"}],"source_content_type":"text/x-rst","patch_set":1,"id":"73e08f90_447d67d4","line":132,"in_reply_to":"9955d96f_2847a0ff","updated":"2025-10-10 15:24:59.000000000","message":"Yes, this is the approach mentioned in solution wait, one winner, other waits until one finishes.","commit_id":"a53386b1a98e4403a04421ea834cd629063e775f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d234908aa74ae115897e753a7d29989a4b0958c1","unresolved":true,"context_lines":[{"line_number":184,"context_line":"2. To avoid streaming partial image to multiple clients in case"},{"line_number":185,"context_line":"   of the initial caching request failing we could block all the"},{"line_number":186,"context_line":"   subsequent requests until the image is fully in cache and serve"},{"line_number":187,"context_line":"   those only from cache."},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"   This approach would cause significant delay serving the rest of"},{"line_number":190,"context_line":"   the clients with a benefit of saved bandwidth in those rare cases"}],"source_content_type":"text/x-rst","patch_set":1,"id":"db6d4a5a_662866d0","line":187,"updated":"2025-10-10 14:35:33.000000000","message":"This is the simplest option to solve the problem, right? One worker \"wins\" the ability to fill the cache, the others wait for it to finish and then start streaming.\n\nAdditionally, the waiting workers could start streaming the partially-cached data while waiting for the primary to finish.\n\nAlso, this seems to be the same as #3 below, and I don\u0027t agree that it\u0027s more complex, unless that\u0027s referring to error case behavior or something.","commit_id":"a53386b1a98e4403a04421ea834cd629063e775f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d52bbe5393325aff41a350c15c65f5a4b81ee97a","unresolved":true,"context_lines":[{"line_number":184,"context_line":"2. To avoid streaming partial image to multiple clients in case"},{"line_number":185,"context_line":"   of the initial caching request failing we could block all the"},{"line_number":186,"context_line":"   subsequent requests until the image is fully in cache and serve"},{"line_number":187,"context_line":"   those only from cache."},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"   This approach would cause significant delay serving the rest of"},{"line_number":190,"context_line":"   the clients with a benefit of saved bandwidth in those rare cases"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3422c80a_a2983677","line":187,"in_reply_to":"db6d4a5a_662866d0","updated":"2025-10-10 15:24:59.000000000","message":"Correct, I will rewrite it to make Alternative #2 the primary solution and remove the confusing Alternative #3.","commit_id":"a53386b1a98e4403a04421ea834cd629063e775f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d234908aa74ae115897e753a7d29989a4b0958c1","unresolved":true,"context_lines":[{"line_number":207,"context_line":"   There are architectural benefits to this. However, it is a"},{"line_number":208,"context_line":"   serious undertaking, and I believe that any conversations"},{"line_number":209,"context_line":"   around this should be had completely outside the context of"},{"line_number":210,"context_line":"   this change."},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"5. Move cache out of Glance API: This requires client side logic"},{"line_number":213,"context_line":"   and new / external caching code."}],"source_content_type":"text/x-rst","patch_set":1,"id":"c675acb9_b9f91f27","line":210,"updated":"2025-10-10 14:35:33.000000000","message":"I think having this in middleware looks nice and transparent \"on paper\" but severely limits the ability to handle this action robustly.","commit_id":"a53386b1a98e4403a04421ea834cd629063e775f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d52bbe5393325aff41a350c15c65f5a4b81ee97a","unresolved":true,"context_lines":[{"line_number":207,"context_line":"   There are architectural benefits to this. However, it is a"},{"line_number":208,"context_line":"   serious undertaking, and I believe that any conversations"},{"line_number":209,"context_line":"   around this should be had completely outside the context of"},{"line_number":210,"context_line":"   this change."},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"5. Move cache out of Glance API: This requires client side logic"},{"line_number":213,"context_line":"   and new / external caching code."}],"source_content_type":"text/x-rst","patch_set":1,"id":"25fdb2be_b631116a","line":210,"in_reply_to":"c675acb9_b9f91f27","updated":"2025-10-10 15:24:59.000000000","message":"Acknowledged, should I remove this.\nI think this is listed here to mention all possible solutions we discussed during the previous PTGs.","commit_id":"a53386b1a98e4403a04421ea834cd629063e775f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d234908aa74ae115897e753a7d29989a4b0958c1","unresolved":true,"context_lines":[{"line_number":211,"context_line":""},{"line_number":212,"context_line":"5. Move cache out of Glance API: This requires client side logic"},{"line_number":213,"context_line":"   and new / external caching code."},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"Data model impact"},{"line_number":216,"context_line":"-----------------"},{"line_number":217,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba62b568_66603c87","line":214,"updated":"2025-10-10 14:35:33.000000000","message":"It seems to me like one better alternative would be to spin up a cache thread (like we do for post-upload hashing). That could complete regardless of whether or not the original client connection drops, and could do a better job of cleanup.","commit_id":"a53386b1a98e4403a04421ea834cd629063e775f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d52bbe5393325aff41a350c15c65f5a4b81ee97a","unresolved":true,"context_lines":[{"line_number":211,"context_line":""},{"line_number":212,"context_line":"5. Move cache out of Glance API: This requires client side logic"},{"line_number":213,"context_line":"   and new / external caching code."},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"Data model impact"},{"line_number":216,"context_line":"-----------------"},{"line_number":217,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"3057e8cd_1ca03998","line":214,"in_reply_to":"ba62b568_66603c87","updated":"2025-10-10 15:24:59.000000000","message":"I think we will still need coordination to ensure only one cache thread runs per image.","commit_id":"a53386b1a98e4403a04421ea834cd629063e775f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d234908aa74ae115897e753a7d29989a4b0958c1","unresolved":true,"context_lines":[{"line_number":261,"context_line":"clients waiting for chunks will also fail after the timeout period."},{"line_number":262,"context_line":"This is different from the current behavior where each client"},{"line_number":263,"context_line":"downloads independently, so if one fails, others continue and"},{"line_number":264,"context_line":"likely succeed (albeit at the cost of speed and bandwidth)."},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"This trade-off should be carefully considered:"},{"line_number":267,"context_line":"- **Benefit**: Eliminates redundant downloads and reduces backend load"}],"source_content_type":"text/x-rst","patch_set":1,"id":"e0827042_28448bcf","line":264,"updated":"2025-10-10 14:35:33.000000000","message":"I think this depends on how it\u0027s implemented. If each caching worker tries to download all blocks in a loop until they\u0027re all there (until timeout) then one worker that was going to download block N but fails would be followed by one of the other workers re-trying to download any missing blocks until they\u0027re all there.","commit_id":"a53386b1a98e4403a04421ea834cd629063e775f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d52bbe5393325aff41a350c15c65f5a4b81ee97a","unresolved":true,"context_lines":[{"line_number":261,"context_line":"clients waiting for chunks will also fail after the timeout period."},{"line_number":262,"context_line":"This is different from the current behavior where each client"},{"line_number":263,"context_line":"downloads independently, so if one fails, others continue and"},{"line_number":264,"context_line":"likely succeed (albeit at the cost of speed and bandwidth)."},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"This trade-off should be carefully considered:"},{"line_number":267,"context_line":"- **Benefit**: Eliminates redundant downloads and reduces backend load"}],"source_content_type":"text/x-rst","patch_set":1,"id":"e6670f5d_068f0d8f","line":264,"in_reply_to":"e0827042_28448bcf","updated":"2025-10-10 15:24:59.000000000","message":"Ack, I will update this section  to mention that multiple workers can cooperatively complete the cache rather than all failing together.","commit_id":"a53386b1a98e4403a04421ea834cd629063e775f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d234908aa74ae115897e753a7d29989a4b0958c1","unresolved":true,"context_lines":[{"line_number":296,"context_line":"2. Update cache request handler to use coordination"},{"line_number":297,"context_line":"3. Update cache response handler to use coordination"},{"line_number":298,"context_line":"4. Add tests for concurrent cache operations"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"**Phase 2: Chunked Caching (Optional Enhancement)**"},{"line_number":301,"context_line":"1. Implement chunked cache storage mechanism"},{"line_number":302,"context_line":"2. Add chunked cache reading logic"}],"source_content_type":"text/x-rst","patch_set":1,"id":"55617988_820bae39","line":299,"updated":"2025-10-10 14:35:33.000000000","message":"There are a lot of words in this spec and I\u0027m having a hard time understanding what the actual proposed solution is here. \"Add locks and use coordination\" is not very specific...","commit_id":"a53386b1a98e4403a04421ea834cd629063e775f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d52bbe5393325aff41a350c15c65f5a4b81ee97a","unresolved":true,"context_lines":[{"line_number":296,"context_line":"2. Update cache request handler to use coordination"},{"line_number":297,"context_line":"3. Update cache response handler to use coordination"},{"line_number":298,"context_line":"4. Add tests for concurrent cache operations"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"**Phase 2: Chunked Caching (Optional Enhancement)**"},{"line_number":301,"context_line":"1. Implement chunked cache storage mechanism"},{"line_number":302,"context_line":"2. Add chunked cache reading logic"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bc42cc97_dfc7ace6","line":299,"in_reply_to":"55617988_820bae39","updated":"2025-10-10 15:24:59.000000000","message":"hmm, I think I will explain about this more in proposed change section and keep it simple here","commit_id":"a53386b1a98e4403a04421ea834cd629063e775f"}]}
