)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"d9b9f400748206c02f39d7865ef1de0437b324b5","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Multiple requests for an image that is not yet cached on the Glance API node"},{"line_number":10,"context_line":"handling the request will result in multiple download requests for the same"},{"line_number":11,"context_line":"image from the object store (i.e. Swift). For example, 1000 concurrent build"},{"line_number":12,"context_line":"requests based off an uncached image can result in 1000 download requests from"},{"line_number":13,"context_line":"the object store to the Glance cache."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a4dcd0f_79d7a7ed","line":11,"updated":"2015-08-04 14:15:33.000000000","message":"see comment about \"i.e.\" on the spec rst","commit_id":"020766bdf2b5f73a2e7f28ec10e33de288471416"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"98f10c52e434f909acadb77baeb15d7253aeebe9","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Jesse J. Cook \u003cjesse.cook@rackspace.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-08-04 09:33:26 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Duplicate downloads spec"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Multiple requests for an image that is not yet cached on the Glance API node"},{"line_number":10,"context_line":"handling the request will result in multiple download requests for the same"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1a4dcd0f_82a04991","line":7,"updated":"2015-08-13 13:58:34.000000000","message":"This would be better titled \"Proposal to eliminate duplicate downloads\".  Otherwise, people might get the impression that you want to add redundancy to the download process (to increase reliability or something).","commit_id":"368f17785d40d8503b878b789719f9ca6dc688ba"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"737d5620372b22ff151e06214b05bc18d35fc8b7","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Jesse J. Cook \u003cjesse.cook@rackspace.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-08-04 09:33:26 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Duplicate downloads spec"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Multiple requests for an image that is not yet cached on the Glance API node"},{"line_number":10,"context_line":"handling the request will result in multiple download requests for the same"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1a4dcd0f_164c77c6","line":7,"in_reply_to":"1a4dcd0f_82a04991","updated":"2015-08-13 15:14:13.000000000","message":"Maybe: Eliminate unnecessary cache requests\n\nI can definitely update next time I push a change.","commit_id":"368f17785d40d8503b878b789719f9ca6dc688ba"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"98f10c52e434f909acadb77baeb15d7253aeebe9","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Duplicate downloads spec"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Multiple requests for an image that is not yet cached on the Glance API node"},{"line_number":10,"context_line":"handling the request will result in multiple download requests for the same"},{"line_number":11,"context_line":"image from the object store. For example, 1000 concurrent build requests based"},{"line_number":12,"context_line":"off an uncached image can result in 1000 download requests from the object"},{"line_number":13,"context_line":"store to the Glance cache."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1a4dcd0f_e206edcc","line":10,"updated":"2015-08-13 13:58:34.000000000","message":"Nit: change \"will\" to \"currently\".","commit_id":"368f17785d40d8503b878b789719f9ca6dc688ba"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"737d5620372b22ff151e06214b05bc18d35fc8b7","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Duplicate downloads spec"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Multiple requests for an image that is not yet cached on the Glance API node"},{"line_number":10,"context_line":"handling the request will result in multiple download requests for the same"},{"line_number":11,"context_line":"image from the object store. For example, 1000 concurrent build requests based"},{"line_number":12,"context_line":"off an uncached image can result in 1000 download requests from the object"},{"line_number":13,"context_line":"store to the Glance cache."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1a4dcd0f_f6f22b6e","line":10,"in_reply_to":"1a4dcd0f_e206edcc","updated":"2015-08-13 15:14:13.000000000","message":"will update to currently results","commit_id":"368f17785d40d8503b878b789719f9ca6dc688ba"}],"specs/liberty/duplicate-downloads.rst":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"d9b9f400748206c02f39d7865ef1de0437b324b5","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Multiple requests for an image that is not yet cached on the Glance API node"},{"line_number":16,"context_line":"handling the request will result in multiple download requests for the same"},{"line_number":17,"context_line":"image from the object store (i.e. Swift). For example, 1000 concurrent build"},{"line_number":18,"context_line":"requests based off an uncached image can result in 1000 download requests from"},{"line_number":19,"context_line":"the object store to the Glance cache."},{"line_number":20,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"1a4dcd0f_39935f51","line":17,"updated":"2015-08-04 14:15:33.000000000","message":"I think you mean \u0027e.g.\u0027 here (unless you are specifically talking only about swift).  Actually, the openstack doc style discourages i.e., and e.g., so just use \u0027for example\u0027.","commit_id":"020766bdf2b5f73a2e7f28ec10e33de288471416"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"d9b9f400748206c02f39d7865ef1de0437b324b5","unresolved":false,"context_lines":[{"line_number":52,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"Update the cache code to limit the number of duplicate downloads to a"},{"line_number":55,"context_line":"configurable number. Absense of the config value will result in the current"},{"line_number":56,"context_line":"behavior where there is no limit on the number of duplicate downloads."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":3,"id":"1a4dcd0f_79a9e77a","line":55,"updated":"2015-08-04 14:15:33.000000000","message":"should be \"Absence\"","commit_id":"020766bdf2b5f73a2e7f28ec10e33de288471416"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"98f10c52e434f909acadb77baeb15d7253aeebe9","unresolved":false,"context_lines":[{"line_number":13,"context_line":"https://blueprints.launchpad.net/glance/+spec/duplicate-downloads"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Multiple requests for an image that is not yet cached on the Glance API node"},{"line_number":16,"context_line":"handling the request will result in multiple download requests for the same"},{"line_number":17,"context_line":"image from the object store. For example, 1000 concurrent build requests based"},{"line_number":18,"context_line":"off an uncached image can result in 1000 download requests from the object"},{"line_number":19,"context_line":"store to the Glance cache."}],"source_content_type":"text/x-rst","patch_set":4,"id":"1a4dcd0f_2ee361a5","line":16,"updated":"2015-08-13 13:58:34.000000000","message":"Nit: instead of \"will result\", how about \"currently result\"?","commit_id":"368f17785d40d8503b878b789719f9ca6dc688ba"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"737d5620372b22ff151e06214b05bc18d35fc8b7","unresolved":false,"context_lines":[{"line_number":13,"context_line":"https://blueprints.launchpad.net/glance/+spec/duplicate-downloads"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Multiple requests for an image that is not yet cached on the Glance API node"},{"line_number":16,"context_line":"handling the request will result in multiple download requests for the same"},{"line_number":17,"context_line":"image from the object store. For example, 1000 concurrent build requests based"},{"line_number":18,"context_line":"off an uncached image can result in 1000 download requests from the object"},{"line_number":19,"context_line":"store to the Glance cache."}],"source_content_type":"text/x-rst","patch_set":4,"id":"1a4dcd0f_b66d8304","line":16,"in_reply_to":"1a4dcd0f_2ee361a5","updated":"2015-08-13 15:14:13.000000000","message":"Will update to currently results","commit_id":"368f17785d40d8503b878b789719f9ca6dc688ba"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"35b0c2779ca42af9cee49f9fb2eb9e229b631bd2","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Feature: Elasticity"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    In order to briefly leverage the power of the Cloud to do some work,"},{"line_number":28,"context_line":"    As an OpenStack Powered Cloud customer"},{"line_number":29,"context_line":"    I want to quickly provision a large number of servers, perform some"},{"line_number":30,"context_line":"    work, and then destroy them."}],"source_content_type":"text/x-rst","patch_set":4,"id":"1a4dcd0f_a2522a65","line":27,"updated":"2015-08-07 13:39:44.000000000","message":"Nit: mind formatting this properly? The paragraph is not wrapped properly. Not sure if it affects the rendered version (can\u0027t verify it right now).","commit_id":"368f17785d40d8503b878b789719f9ca6dc688ba"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"482f7a156d1e03fa6a3c978b20b3e2de6dca5bfc","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Feature: Elasticity"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    In order to briefly leverage the power of the Cloud to do some work,"},{"line_number":28,"context_line":"    As an OpenStack Powered Cloud customer"},{"line_number":29,"context_line":"    I want to quickly provision a large number of servers, perform some"},{"line_number":30,"context_line":"    work, and then destroy them."}],"source_content_type":"text/x-rst","patch_set":4,"id":"1a4dcd0f_a4abb11d","line":27,"in_reply_to":"1a4dcd0f_a2522a65","updated":"2015-08-10 23:02:55.000000000","message":"Ah, sorry. It\u0027s a Cucumber [0] feature specification and is designed to be formatted as such. I\u0027ve been using these of recent as I push for a more BDD-like process upstream.\n\n[0] http://pythonhosted.org/behave/tutorial.html#feature-files","commit_id":"368f17785d40d8503b878b789719f9ca6dc688ba"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"98f10c52e434f909acadb77baeb15d7253aeebe9","unresolved":false,"context_lines":[{"line_number":52,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"Update the cache code to limit the number of duplicate downloads to a"},{"line_number":55,"context_line":"configurable number. Absense of the config value will result in the current"},{"line_number":56,"context_line":"behavior where there is no limit on the number of duplicate downloads."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":4,"id":"1a4dcd0f_ee96d9ee","line":55,"updated":"2015-08-13 13:58:34.000000000","message":"Nit: \"Absence\"","commit_id":"368f17785d40d8503b878b789719f9ca6dc688ba"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"737d5620372b22ff151e06214b05bc18d35fc8b7","unresolved":false,"context_lines":[{"line_number":52,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"Update the cache code to limit the number of duplicate downloads to a"},{"line_number":55,"context_line":"configurable number. Absense of the config value will result in the current"},{"line_number":56,"context_line":"behavior where there is no limit on the number of duplicate downloads."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":4,"id":"1a4dcd0f_7674dbcd","line":55,"in_reply_to":"1a4dcd0f_ee96d9ee","updated":"2015-08-13 15:14:13.000000000","message":"Will fix","commit_id":"368f17785d40d8503b878b789719f9ca6dc688ba"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"35b0c2779ca42af9cee49f9fb2eb9e229b631bd2","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"Update the cache code to limit the number of duplicate downloads to a"},{"line_number":55,"context_line":"configurable number. Absense of the config value will result in the current"},{"line_number":56,"context_line":"behavior where there is no limit on the number of duplicate downloads."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Alternatives"},{"line_number":59,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"1a4dcd0f_424d66c2","line":56,"updated":"2015-08-07 13:39:44.000000000","message":"I think it\u0027d be worth mentioning how the counter will b ekept. For instance, I\u0027m interested in knowing wether the counter will be kept per-process. Could you expand on that?","commit_id":"368f17785d40d8503b878b789719f9ca6dc688ba"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"482f7a156d1e03fa6a3c978b20b3e2de6dca5bfc","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"Update the cache code to limit the number of duplicate downloads to a"},{"line_number":55,"context_line":"configurable number. Absense of the config value will result in the current"},{"line_number":56,"context_line":"behavior where there is no limit on the number of duplicate downloads."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Alternatives"},{"line_number":59,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"1a4dcd0f_e414594e","line":56,"in_reply_to":"1a4dcd0f_424d66c2","updated":"2015-08-10 23:02:55.000000000","message":"We haven\u0027t explored exactly what this will look like. It\u0027s kind of dependent on what makes the most sense once we get into the code. I\u0027d lean towards doing something at the FS level like a counting semaphore or something completely lock free where we try to only download the file n times, but if we pull it a couple extra because of a race, no biggie.\n\nI\u0027d prefer to hold off on adding this detail until we have a first pass of a code proposal ready, but I agree, it could warrant some discussion that we can certainly add here if that makes sense.\n\nI\u0027ll leave the spec as is until we come to an agreement with some code to back it up.","commit_id":"368f17785d40d8503b878b789719f9ca6dc688ba"}],"specs/mitaka/duplicate-downloads.rst":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"d12c6f6ab65f099c50131c479bf11cd4f5ff63d5","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"Update the cache code to limit the number of duplicate downloads to a"},{"line_number":55,"context_line":"configurable number. Absence of the config value will result in the current"},{"line_number":56,"context_line":"behavior where there is no limit on the number of duplicate downloads."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Alternatives"},{"line_number":59,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"1a26ad4f_8baf9c93","line":56,"updated":"2015-10-30 06:07:13.000000000","message":"Could you be more explicit about how this would work/implemented?\n\nWould this use locks to control the max number of concurrent downloads? Would this work just the way it works now but up to N (confgurable) numbers of concurrent downloads for the same image?\n\nHow does the fourth (or third) (or second) guy know that he has to wait? (Quoting Stuart)","commit_id":"cf2652ab31d76fa53926c1d4e476a56fe9f693ab"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"54dd95cd7baba65832673ef3732497ddeb807a20","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"Update the cache code to limit the number of duplicate downloads to a"},{"line_number":55,"context_line":"configurable number. Absence of the config value will result in the current"},{"line_number":56,"context_line":"behavior where there is no limit on the number of duplicate downloads."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Alternatives"},{"line_number":59,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"1a26ad4f_1c3e358c","line":56,"in_reply_to":"1a26ad4f_8baf9c93","updated":"2015-11-02 16:30:15.000000000","message":"It could be done in a number of ways and defining the specific approach here feels a little down in the weeds for a spec. It probably be better to save this conversation for the implementation. That being said, we can do some research and recommend the approach that makes sense for a first pass at the implementation.\n\nUltimately, it doesn\u0027t matter if it is a little racey. The goal is not to have a set number of duplicate downloads. The goal is to minimize that with some ceiling for allowable duplicates to ensure success a hiccup doesn\u0027t cause n requests to hang. A counting semaphore could be used. It could be tied to the number of processes (though that might be excessive depending on deployment). I\u0027m sure there are many more options. We\u0027ll make a proposal and update.","commit_id":"cf2652ab31d76fa53926c1d4e476a56fe9f693ab"}],"specs/pike/approved/glance/duplicate-downloads.rst":[{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"d0340370d390930536f16a70a6e852180abbeff9","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        And the requested image exists in the object store"},{"line_number":35,"context_line":"        And the requested image is uncached on the Glance API node"},{"line_number":36,"context_line":"        When \u003crequest\u003e concurrent request(s) for the image is/are made"},{"line_number":37,"context_line":"        And disable_duplicate_downloads is \u003cenabled\u003e"},{"line_number":38,"context_line":"        Then the image will be downloaded from the object store \u003cdownload\u003e times"},{"line_number":39,"context_line":"        And the image will be cached on the Glance API node"},{"line_number":40,"context_line":"        And every request for the image will succeed"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"7a3c09a3_b89916d3","line":38,"range":{"start_line":37,"start_character":8,"end_line":38,"end_character":80},"updated":"2017-01-18 20:24:53.000000000","message":"I might be missing something here. But if we enable \u0027disable_duplicate_downloads\u0027 , we do not allow multiple downloads right? As per L100/L45, only the first request will result in a download from object store and note request 2.","commit_id":"4ce5bd2eb1dd0a102698a78347573a0fbf2af04d"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"fb6ec4798abf4529d8a349b629841774a68bc5b6","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        And the requested image exists in the object store"},{"line_number":35,"context_line":"        And the requested image is uncached on the Glance API node"},{"line_number":36,"context_line":"        When \u003crequest\u003e concurrent request(s) for the image is/are made"},{"line_number":37,"context_line":"        And disable_duplicate_downloads is \u003cenabled\u003e"},{"line_number":38,"context_line":"        Then the image will be downloaded from the object store \u003cdownload\u003e times"},{"line_number":39,"context_line":"        And the image will be cached on the Glance API node"},{"line_number":40,"context_line":"        And every request for the image will succeed"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"7a3c09a3_ffa380fe","line":38,"range":{"start_line":37,"start_character":8,"end_line":38,"end_character":80},"in_reply_to":"7a3c09a3_b89916d3","updated":"2017-01-18 21:56:42.000000000","message":"Correct so:\n\nWhen 2 concurrent requests for the image are made\nAnd disable_duplicate_downloads is enabled\nThen the image will be downloaded from the object store 1 times\n\nThe other request will receive a waiting iterator, which retrieves from the cache.","commit_id":"4ce5bd2eb1dd0a102698a78347573a0fbf2af04d"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"5cd7bb3a836e1f4f0cd4d21ab1f8024df89a605d","unresolved":false,"context_lines":[{"line_number":67,"context_line":"Currently, the Glance caching middleware returns an iterator that"},{"line_number":68,"context_line":"downloads from the cache only if the image is already cached. If"},{"line_number":69,"context_line":"the image is uncached, the request is passed onto the API to obtain"},{"line_number":70,"context_line":"an iterator that downloads directly to the store. These iterators"},{"line_number":71,"context_line":"are passed back up through the caching middleware to the WSGI in"},{"line_number":72,"context_line":"the response. If the image is uncached when the middleware"},{"line_number":73,"context_line":"processes a response, it will wrap the iterator from the API in an"}],"source_content_type":"text/x-rst","patch_set":12,"id":"1a430d35_bcea440d","line":70,"range":{"start_line":70,"start_character":36,"end_line":70,"end_character":38},"updated":"2017-02-08 00:23:48.000000000","message":"from?","commit_id":"5e11d38d4860e261bfab2d7ef0a1aaf4d85bbb65"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"532b53adf4eba29d1b5fdfcf9ca961bf517c84cb","unresolved":false,"context_lines":[{"line_number":67,"context_line":"Currently, the Glance caching middleware returns an iterator that"},{"line_number":68,"context_line":"downloads from the cache only if the image is already cached. If"},{"line_number":69,"context_line":"the image is uncached, the request is passed onto the API to obtain"},{"line_number":70,"context_line":"an iterator that downloads directly to the store. These iterators"},{"line_number":71,"context_line":"are passed back up through the caching middleware to the WSGI in"},{"line_number":72,"context_line":"the response. If the image is uncached when the middleware"},{"line_number":73,"context_line":"processes a response, it will wrap the iterator from the API in an"}],"source_content_type":"text/x-rst","patch_set":12,"id":"1a430d35_14cd9a86","line":70,"range":{"start_line":70,"start_character":36,"end_line":70,"end_character":38},"in_reply_to":"1a430d35_bcea440d","updated":"2017-02-09 15:25:17.000000000","message":"aye, TODO(jesse): fix this","commit_id":"5e11d38d4860e261bfab2d7ef0a1aaf4d85bbb65"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"5cd7bb3a836e1f4f0cd4d21ab1f8024df89a605d","unresolved":false,"context_lines":[{"line_number":70,"context_line":"an iterator that downloads directly to the store. These iterators"},{"line_number":71,"context_line":"are passed back up through the caching middleware to the WSGI in"},{"line_number":72,"context_line":"the response. If the image is uncached when the middleware"},{"line_number":73,"context_line":"processes a response, it will wrap the iterator from the API in an"},{"line_number":74,"context_line":"another iterator that will tee to the cache. This approach is racey"},{"line_number":75,"context_line":"and can result in many responses downloading directly from the"},{"line_number":76,"context_line":"store and a subset of those teeing data to the same location on the"}],"source_content_type":"text/x-rst","patch_set":12,"id":"1a430d35_dead4885","line":73,"range":{"start_line":73,"start_character":64,"end_line":73,"end_character":66},"updated":"2017-02-08 00:23:48.000000000","message":"s/an//","commit_id":"5e11d38d4860e261bfab2d7ef0a1aaf4d85bbb65"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"532b53adf4eba29d1b5fdfcf9ca961bf517c84cb","unresolved":false,"context_lines":[{"line_number":70,"context_line":"an iterator that downloads directly to the store. These iterators"},{"line_number":71,"context_line":"are passed back up through the caching middleware to the WSGI in"},{"line_number":72,"context_line":"the response. If the image is uncached when the middleware"},{"line_number":73,"context_line":"processes a response, it will wrap the iterator from the API in an"},{"line_number":74,"context_line":"another iterator that will tee to the cache. This approach is racey"},{"line_number":75,"context_line":"and can result in many responses downloading directly from the"},{"line_number":76,"context_line":"store and a subset of those teeing data to the same location on the"}],"source_content_type":"text/x-rst","patch_set":12,"id":"1a430d35_74c41e5f","line":73,"range":{"start_line":73,"start_character":64,"end_line":73,"end_character":66},"in_reply_to":"1a430d35_dead4885","updated":"2017-02-09 15:25:17.000000000","message":"aye, TODO(jesse): fix this","commit_id":"5e11d38d4860e261bfab2d7ef0a1aaf4d85bbb65"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"5cd7bb3a836e1f4f0cd4d21ab1f8024df89a605d","unresolved":false,"context_lines":[{"line_number":73,"context_line":"processes a response, it will wrap the iterator from the API in an"},{"line_number":74,"context_line":"another iterator that will tee to the cache. This approach is racey"},{"line_number":75,"context_line":"and can result in many responses downloading directly from the"},{"line_number":76,"context_line":"store and a subset of those teeing data to the same location on the"},{"line_number":77,"context_line":"filesystem."},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"One approach to solving this problem is to return an iterator that"},{"line_number":80,"context_line":"will download from the cache for every request regardless if the"}],"source_content_type":"text/x-rst","patch_set":12,"id":"1a430d35_3e3e4c28","line":77,"range":{"start_line":76,"start_character":28,"end_line":77,"end_character":11},"updated":"2017-02-08 00:23:48.000000000","message":"getting tee\u0027d to a location on the filesystem ?","commit_id":"5e11d38d4860e261bfab2d7ef0a1aaf4d85bbb65"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"532b53adf4eba29d1b5fdfcf9ca961bf517c84cb","unresolved":false,"context_lines":[{"line_number":73,"context_line":"processes a response, it will wrap the iterator from the API in an"},{"line_number":74,"context_line":"another iterator that will tee to the cache. This approach is racey"},{"line_number":75,"context_line":"and can result in many responses downloading directly from the"},{"line_number":76,"context_line":"store and a subset of those teeing data to the same location on the"},{"line_number":77,"context_line":"filesystem."},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"One approach to solving this problem is to return an iterator that"},{"line_number":80,"context_line":"will download from the cache for every request regardless if the"}],"source_content_type":"text/x-rst","patch_set":12,"id":"1a430d35_143e7a29","line":77,"range":{"start_line":76,"start_character":28,"end_line":77,"end_character":11},"in_reply_to":"1a430d35_3e3e4c28","updated":"2017-02-09 15:25:17.000000000","message":"I think maybe leave this bit as is and change responses to response iterators.","commit_id":"5e11d38d4860e261bfab2d7ef0a1aaf4d85bbb65"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"5cd7bb3a836e1f4f0cd4d21ab1f8024df89a605d","unresolved":false,"context_lines":[{"line_number":79,"context_line":"One approach to solving this problem is to return an iterator that"},{"line_number":80,"context_line":"will download from the cache for every request regardless if the"},{"line_number":81,"context_line":"image is already cached or not. This iterator would be a waiting"},{"line_number":82,"context_line":"iterator that would return data as it becomes available in the"},{"line_number":83,"context_line":"cache. The caching middleware would be responsible for spawning a"},{"line_number":84,"context_line":"resilient worker / set of workers that are multi-process and thread"},{"line_number":85,"context_line":"safe to download the image to the cache. Considerations for whether"}],"source_content_type":"text/x-rst","patch_set":12,"id":"1a430d35_a15f81e3","line":82,"updated":"2017-02-08 00:23:48.000000000","message":"What about the overhead of time with this until it is cached?","commit_id":"5e11d38d4860e261bfab2d7ef0a1aaf4d85bbb65"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"532b53adf4eba29d1b5fdfcf9ca961bf517c84cb","unresolved":false,"context_lines":[{"line_number":79,"context_line":"One approach to solving this problem is to return an iterator that"},{"line_number":80,"context_line":"will download from the cache for every request regardless if the"},{"line_number":81,"context_line":"image is already cached or not. This iterator would be a waiting"},{"line_number":82,"context_line":"iterator that would return data as it becomes available in the"},{"line_number":83,"context_line":"cache. The caching middleware would be responsible for spawning a"},{"line_number":84,"context_line":"resilient worker / set of workers that are multi-process and thread"},{"line_number":85,"context_line":"safe to download the image to the cache. Considerations for whether"}],"source_content_type":"text/x-rst","patch_set":12,"id":"1a430d35_918d1c2d","line":82,"in_reply_to":"1a430d35_a15f81e3","updated":"2017-02-09 15:25:17.000000000","message":"The only overhead here is the time to read and write to the disk, which is no different for the first uncached request which already uses the tee iterator today. For subsequent, parallel requests, the difference is reading the data from the disk as it is written vs pulling the data across the network from the object store. If you have a really fat pipe, and really slow disks on your node, it could be more. That said, if you have a really fat pipe and really slow disks, you probably shouldn\u0027t have caching enabled.","commit_id":"5e11d38d4860e261bfab2d7ef0a1aaf4d85bbb65"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"f1a8324138267e806faa36c26332e22645811240","unresolved":false,"context_lines":[{"line_number":81,"context_line":"image is already cached or not. This iterator would be a waiting"},{"line_number":82,"context_line":"iterator that would return data as it becomes available in the"},{"line_number":83,"context_line":"cache. The caching middleware would be responsible for spawning a"},{"line_number":84,"context_line":"resilient worker / set of workers that are multi-process and thread"},{"line_number":85,"context_line":"safe to download the image to the cache. Considerations for whether"},{"line_number":86,"context_line":"the image should be downloaded concurrently by chunk or serially"},{"line_number":87,"context_line":"and whether the image should be stored as a single file or"}],"source_content_type":"text/x-rst","patch_set":12,"id":"fa31d9ce_3f37dbe4","line":84,"range":{"start_line":84,"start_character":0,"end_line":84,"end_character":16},"updated":"2017-02-10 00:37:27.000000000","message":"Can you please elaborate on the resilience?","commit_id":"5e11d38d4860e261bfab2d7ef0a1aaf4d85bbb65"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"93911d741e53b269f6515a2bb01856aacd939d27","unresolved":false,"context_lines":[{"line_number":81,"context_line":"image is already cached or not. This iterator would be a waiting"},{"line_number":82,"context_line":"iterator that would return data as it becomes available in the"},{"line_number":83,"context_line":"cache. The caching middleware would be responsible for spawning a"},{"line_number":84,"context_line":"resilient worker / set of workers that are multi-process and thread"},{"line_number":85,"context_line":"safe to download the image to the cache. Considerations for whether"},{"line_number":86,"context_line":"the image should be downloaded concurrently by chunk or serially"},{"line_number":87,"context_line":"and whether the image should be stored as a single file or"}],"source_content_type":"text/x-rst","patch_set":12,"id":"fa31d9ce_a988ddc7","line":84,"range":{"start_line":84,"start_character":0,"end_line":84,"end_character":16},"in_reply_to":"fa31d9ce_3f37dbe4","updated":"2017-02-16 21:25:56.000000000","message":"Sure, so the worker should be expected to retry for ephemeral errors. A retry from a client should be no more successful than a retry from the worker. This might require changes to the object that is returned from the API (currently an iterator based on the store the data will be retrieved from that likely does not retry on failure).","commit_id":"5e11d38d4860e261bfab2d7ef0a1aaf4d85bbb65"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"5cd7bb3a836e1f4f0cd4d21ab1f8024df89a605d","unresolved":false,"context_lines":[{"line_number":87,"context_line":"and whether the image should be stored as a single file or"},{"line_number":88,"context_line":"segmented should be made when investigating specific mechanisms to"},{"line_number":89,"context_line":"support this approach."},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"One additional consideration, that is out of scope for this change,"},{"line_number":92,"context_line":"is that some requests might prefer to download directly from the"},{"line_number":93,"context_line":"store rather than the cache. For the purposes of this change, if"}],"source_content_type":"text/x-rst","patch_set":12,"id":"1a430d35_7c537ce2","line":90,"updated":"2017-02-08 00:23:48.000000000","message":"What happens when there is a failure in caching it before serving it? An image would not be served cos it was not cached. While in the tee process, the direct download would have succeeded and only the caching failed.","commit_id":"5e11d38d4860e261bfab2d7ef0a1aaf4d85bbb65"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"f1a8324138267e806faa36c26332e22645811240","unresolved":false,"context_lines":[{"line_number":87,"context_line":"and whether the image should be stored as a single file or"},{"line_number":88,"context_line":"segmented should be made when investigating specific mechanisms to"},{"line_number":89,"context_line":"support this approach."},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"One additional consideration, that is out of scope for this change,"},{"line_number":92,"context_line":"is that some requests might prefer to download directly from the"},{"line_number":93,"context_line":"store rather than the cache. For the purposes of this change, if"}],"source_content_type":"text/x-rst","patch_set":12,"id":"fa31d9ce_deb32509","line":90,"in_reply_to":"1a430d35_11d04cf7","updated":"2017-02-10 00:37:27.000000000","message":"The thing is as per the proposed method, the waiting iterator is going to be using data from the cache as and when it is available.\nSo we entirely depend on the first image cache to succeed (unlike our tee approach) to serve say n download requests.\nAnd, an image cache failure(which could be cos of anything related to caching) need not mean a direct store image download failure.\nLet me know if I am missing something here.","commit_id":"5e11d38d4860e261bfab2d7ef0a1aaf4d85bbb65"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"532b53adf4eba29d1b5fdfcf9ca961bf517c84cb","unresolved":false,"context_lines":[{"line_number":87,"context_line":"and whether the image should be stored as a single file or"},{"line_number":88,"context_line":"segmented should be made when investigating specific mechanisms to"},{"line_number":89,"context_line":"support this approach."},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"One additional consideration, that is out of scope for this change,"},{"line_number":92,"context_line":"is that some requests might prefer to download directly from the"},{"line_number":93,"context_line":"store rather than the cache. For the purposes of this change, if"}],"source_content_type":"text/x-rst","patch_set":12,"id":"1a430d35_11d04cf7","line":90,"in_reply_to":"1a430d35_7c537ce2","updated":"2017-02-09 15:25:17.000000000","message":"If a worker is unable to download the image with a resilient retry mechanism, there is no hope that any request would succeed, and throwing more requests at it is more likely to cause failures due to timeouts / load on the object store.","commit_id":"5e11d38d4860e261bfab2d7ef0a1aaf4d85bbb65"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"93911d741e53b269f6515a2bb01856aacd939d27","unresolved":false,"context_lines":[{"line_number":87,"context_line":"and whether the image should be stored as a single file or"},{"line_number":88,"context_line":"segmented should be made when investigating specific mechanisms to"},{"line_number":89,"context_line":"support this approach."},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"One additional consideration, that is out of scope for this change,"},{"line_number":92,"context_line":"is that some requests might prefer to download directly from the"},{"line_number":93,"context_line":"store rather than the cache. For the purposes of this change, if"}],"source_content_type":"text/x-rst","patch_set":12,"id":"fa31d9ce_4cd4cf46","line":90,"in_reply_to":"fa31d9ce_deb32509","updated":"2017-02-16 21:25:56.000000000","message":"What I\u0027m proposing is that the cache act like a proper proxy. The first request might trigger a cache, but it\u0027s success / failure (i.e. client connection drops) has no effect on the cache downloading the image. The cache worker will continue to download the request regardless (i.e. asynchronously).\n\nThe cache is responsible for resiliency instead of pushing that off on the response object. Currently the response object could fall back and download from the store. That\u0027s a resiliency mechanism that should be abstracted away into the cache. The response should only have to worry about resiliency of downloading from the cache not with the backend. If the cache worries about downloading the image and retries, it should be possible to implement it such that the individual responses would be no more successful than the proxy even if it would fallback to directly downloading from the store.\n\nThe case where this might break down is if the local cache disk fails (i.e. hardware failure). In that case you can either treat that as a system failure (i.e. yeah stuff is gonna fail until the operator fixes the hardware) or have the cache stream directly from the backend store having the response be none the wiser. I\u0027d vote, system failure though.","commit_id":"5e11d38d4860e261bfab2d7ef0a1aaf4d85bbb65"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"5cd7bb3a836e1f4f0cd4d21ab1f8024df89a605d","unresolved":false,"context_lines":[{"line_number":96,"context_line":""},{"line_number":97,"context_line":"Alternatives"},{"line_number":98,"context_line":"------------"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"1. Update the cache middleware response handler to return a"},{"line_number":101,"context_line":"   waiting iterator (see below) if the image is cached or caching."},{"line_number":102,"context_line":"   This ensures only the first request to reach the response"}],"source_content_type":"text/x-rst","patch_set":12,"id":"1a430d35_7c47fcbb","line":99,"updated":"2017-02-08 00:23:48.000000000","message":"Any specific reason why the \u0027Proposed change\u0027 was preferred over \u0027Alternative #1\u0027? \nI find with Alternative #1 to be safer and better in terms of satisfying the downloads.","commit_id":"5e11d38d4860e261bfab2d7ef0a1aaf4d85bbb65"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"532b53adf4eba29d1b5fdfcf9ca961bf517c84cb","unresolved":false,"context_lines":[{"line_number":96,"context_line":""},{"line_number":97,"context_line":"Alternatives"},{"line_number":98,"context_line":"------------"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"1. Update the cache middleware response handler to return a"},{"line_number":101,"context_line":"   waiting iterator (see below) if the image is cached or caching."},{"line_number":102,"context_line":"   This ensures only the first request to reach the response"}],"source_content_type":"text/x-rst","patch_set":12,"id":"1a430d35_71a6f054","line":99,"in_reply_to":"1a430d35_7c47fcbb","updated":"2017-02-09 15:25:17.000000000","message":"Alternative #1 is racey as currently documented. Multiple requests could get a tee iterator. While this could be fixed with a locking mechanism combined with delaying determination of which iterator to use until iteration, it\u0027s more complex than the current proposal.\n\nFurther, there are many places where the tee iterator could fail as it traverses an arbitrary number of layers of code before it is executed. These layers of code might change without having any understanding of the impact on the tee iterator.","commit_id":"5e11d38d4860e261bfab2d7ef0a1aaf4d85bbb65"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"5cd7bb3a836e1f4f0cd4d21ab1f8024df89a605d","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":"   The iterator will allow download from the cache as data becomes"},{"line_number":114,"context_line":"   available. The iterator will read until the image is fully"},{"line_number":115,"context_line":"   cached and all data is read. If the cache of the image fails,"},{"line_number":116,"context_line":"   the cached image will be cleaned up, and each request"},{"line_number":117,"context_line":"   downloading from the cache will fail requiring a retry by the"},{"line_number":118,"context_line":"   client."},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"   In both the case where disable_duplicate_downloads is enabled"},{"line_number":121,"context_line":"   (new behavior) or disable_duplicate_downloads is disabled"}],"source_content_type":"text/x-rst","patch_set":12,"id":"1a430d35_c131ed5b","line":118,"range":{"start_line":115,"start_character":32,"end_line":118,"end_character":10},"updated":"2017-02-08 00:23:48.000000000","message":"If it failed once, it is highly possible that retry from the client might fail again due to the same reason right? Do we have some mechanism to prevent an infinite retry? We should treat this as a cache-miss.","commit_id":"5e11d38d4860e261bfab2d7ef0a1aaf4d85bbb65"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"532b53adf4eba29d1b5fdfcf9ca961bf517c84cb","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":"   The iterator will allow download from the cache as data becomes"},{"line_number":114,"context_line":"   available. The iterator will read until the image is fully"},{"line_number":115,"context_line":"   cached and all data is read. If the cache of the image fails,"},{"line_number":116,"context_line":"   the cached image will be cleaned up, and each request"},{"line_number":117,"context_line":"   downloading from the cache will fail requiring a retry by the"},{"line_number":118,"context_line":"   client."},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"   In both the case where disable_duplicate_downloads is enabled"},{"line_number":121,"context_line":"   (new behavior) or disable_duplicate_downloads is disabled"}],"source_content_type":"text/x-rst","patch_set":12,"id":"1a430d35_74ffbeaa","line":118,"range":{"start_line":115,"start_character":32,"end_line":118,"end_character":10},"in_reply_to":"1a430d35_c131ed5b","updated":"2017-02-09 15:25:17.000000000","message":"The number of retries is up to the client.\n\nThere\u0027s a good discussion point here. What do we do about failures that are API side, like caching to the disk due to out of disk space? Do we fallback to no caching or do we require the resiliency of the download mechanism to handle that? I\u0027d argue, build it into the resiliency. If the cache breaks, you can break that into two categories: a) code bug / improvement b) hardware failure. We address the former, and operators should rebuild node for the latter.","commit_id":"5e11d38d4860e261bfab2d7ef0a1aaf4d85bbb65"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"5cd7bb3a836e1f4f0cd4d21ab1f8024df89a605d","unresolved":false,"context_lines":[{"line_number":140,"context_line":"   failures and improves performance when a large number of image"},{"line_number":141,"context_line":"   download requests are made. It comes at the cost of all"},{"line_number":142,"context_line":"   downloads occurring while an image is being cached depending on"},{"line_number":143,"context_line":"   that single cache to be successful. This means a cache failure"},{"line_number":144,"context_line":"   could result in more clients needing to retry, potentially"},{"line_number":145,"context_line":"   after waiting for nearly the entire image to download."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"2. Create a lock within the middleware request handler: This"},{"line_number":148,"context_line":"   prevents requests from reaching the root app and establishing a"}],"source_content_type":"text/x-rst","patch_set":12,"id":"1a430d35_3cfad475","line":145,"range":{"start_line":143,"start_character":39,"end_line":145,"end_character":57},"updated":"2017-02-08 00:23:48.000000000","message":"We must fall back such that after a certain number of retires from the cache, the download is proceeded form the store?","commit_id":"5e11d38d4860e261bfab2d7ef0a1aaf4d85bbb65"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"532b53adf4eba29d1b5fdfcf9ca961bf517c84cb","unresolved":false,"context_lines":[{"line_number":140,"context_line":"   failures and improves performance when a large number of image"},{"line_number":141,"context_line":"   download requests are made. It comes at the cost of all"},{"line_number":142,"context_line":"   downloads occurring while an image is being cached depending on"},{"line_number":143,"context_line":"   that single cache to be successful. This means a cache failure"},{"line_number":144,"context_line":"   could result in more clients needing to retry, potentially"},{"line_number":145,"context_line":"   after waiting for nearly the entire image to download."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"2. Create a lock within the middleware request handler: This"},{"line_number":148,"context_line":"   prevents requests from reaching the root app and establishing a"}],"source_content_type":"text/x-rst","patch_set":12,"id":"1a430d35_54f002ca","line":145,"range":{"start_line":143,"start_character":39,"end_line":145,"end_character":57},"in_reply_to":"1a430d35_3cfad475","updated":"2017-02-09 15:25:17.000000000","message":"I don\u0027t think so. That just makes the architecture more complex. If the cache cannot download the image, than the client should not be able to either. If it can, there\u0027s a bug and we should fix it.","commit_id":"5e11d38d4860e261bfab2d7ef0a1aaf4d85bbb65"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"f1a8324138267e806faa36c26332e22645811240","unresolved":false,"context_lines":[{"line_number":140,"context_line":"   failures and improves performance when a large number of image"},{"line_number":141,"context_line":"   download requests are made. It comes at the cost of all"},{"line_number":142,"context_line":"   downloads occurring while an image is being cached depending on"},{"line_number":143,"context_line":"   that single cache to be successful. This means a cache failure"},{"line_number":144,"context_line":"   could result in more clients needing to retry, potentially"},{"line_number":145,"context_line":"   after waiting for nearly the entire image to download."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"2. Create a lock within the middleware request handler: This"},{"line_number":148,"context_line":"   prevents requests from reaching the root app and establishing a"}],"source_content_type":"text/x-rst","patch_set":12,"id":"fa31d9ce_9e360db3","line":145,"range":{"start_line":143,"start_character":39,"end_line":145,"end_character":57},"in_reply_to":"1a430d35_54f002ca","updated":"2017-02-10 00:37:27.000000000","message":"Why is that always an image cache failure imply that a direct client download should fail too? Am I missing something?","commit_id":"5e11d38d4860e261bfab2d7ef0a1aaf4d85bbb65"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"93911d741e53b269f6515a2bb01856aacd939d27","unresolved":false,"context_lines":[{"line_number":140,"context_line":"   failures and improves performance when a large number of image"},{"line_number":141,"context_line":"   download requests are made. It comes at the cost of all"},{"line_number":142,"context_line":"   downloads occurring while an image is being cached depending on"},{"line_number":143,"context_line":"   that single cache to be successful. This means a cache failure"},{"line_number":144,"context_line":"   could result in more clients needing to retry, potentially"},{"line_number":145,"context_line":"   after waiting for nearly the entire image to download."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"2. Create a lock within the middleware request handler: This"},{"line_number":148,"context_line":"   prevents requests from reaching the root app and establishing a"}],"source_content_type":"text/x-rst","patch_set":12,"id":"fa31d9ce_ccf51fcc","line":145,"range":{"start_line":143,"start_character":39,"end_line":145,"end_character":57},"in_reply_to":"fa31d9ce_9e360db3","updated":"2017-02-16 21:25:56.000000000","message":"So both the cache proxy / cache worker and the response object are downloading from the store. Why would a response object be able to do this more successfully than the cache? It shouldn\u0027t. The only advantage you gain is if the cache cannot retry due to an ephemeral error. This approach would require such which might require changes to the response object returned from the api / stores (i.e. currently an interator).","commit_id":"5e11d38d4860e261bfab2d7ef0a1aaf4d85bbb65"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"d97b5800e12941c280083e25f4468463f92f4741","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    As an OpenStack Powered Cloud customer"},{"line_number":29,"context_line":"    I want to quickly provision a large number of servers, perform some"},{"line_number":30,"context_line":"    work, and then destroy them."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    Scenario Outline: Concurrent Requests for Uncached Image"},{"line_number":33,"context_line":"        Given a single Glance API node"},{"line_number":34,"context_line":"        And the requested image exists in the object store"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ffe62b97_c8e363a4","line":31,"updated":"2017-03-23 21:29:30.000000000","message":"\"I decide to use Glance\u0027s image caching middleware\" .. or something.. Just to put it forward that caching is optional, but we are using it for our use case here.","commit_id":"ed1179ac9588a4a9efc001d4eab13876bd8b1f29"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"5fc6ae52e2df8e98ffffe076c4b38321f7f62698","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    As an OpenStack Powered Cloud customer"},{"line_number":29,"context_line":"    I want to quickly provision a large number of servers, perform some"},{"line_number":30,"context_line":"    work, and then destroy them."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    Scenario Outline: Concurrent Requests for Uncached Image"},{"line_number":33,"context_line":"        Given a single Glance API node"},{"line_number":34,"context_line":"        And the requested image exists in the object store"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ffe62b97_c215a94a","line":31,"in_reply_to":"ffe62b97_c8e363a4","updated":"2017-03-29 14:42:31.000000000","message":"Done","commit_id":"ed1179ac9588a4a9efc001d4eab13876bd8b1f29"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"d97b5800e12941c280083e25f4468463f92f4741","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        Examples: Concurrent Requests"},{"line_number":60,"context_line":"            | n | enabled  | will     |"},{"line_number":61,"context_line":"            | 2 | enabled  | will     |"},{"line_number":62,"context_line":"            | 2 | disabled | will not |"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    Scenario: Stream to all requests while caching"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ffe62b97_e8f50785","line":61,"range":{"start_line":61,"start_character":29,"end_line":61,"end_character":33},"updated":"2017-03-23 21:29:30.000000000","message":"Can we very briefly say how?","commit_id":"ed1179ac9588a4a9efc001d4eab13876bd8b1f29"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"5fc6ae52e2df8e98ffffe076c4b38321f7f62698","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        Examples: Concurrent Requests"},{"line_number":60,"context_line":"            | n | enabled  | will     |"},{"line_number":61,"context_line":"            | 2 | enabled  | will     |"},{"line_number":62,"context_line":"            | 2 | disabled | will not |"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    Scenario: Stream to all requests while caching"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ffe62b97_b558a130","line":61,"range":{"start_line":61,"start_character":29,"end_line":61,"end_character":33},"in_reply_to":"ffe62b97_e8f50785","updated":"2017-03-29 14:42:31.000000000","message":"I don\u0027t think how belongs in the problem description / scenarios. That should be covered in the proposed change.","commit_id":"ed1179ac9588a4a9efc001d4eab13876bd8b1f29"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"d97b5800e12941c280083e25f4468463f92f4741","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        Then the 2 requests to API node 1 will succeed"},{"line_number":73,"context_line":"        And the 2 requests to API node 2 will succeed"},{"line_number":74,"context_line":"        And the image will be cached on Glance API node 1"},{"line_number":75,"context_line":"        And the image will not be cached on Glance API node 2"},{"line_number":76,"context_line":"        And the request completion time between the 2 requests to node 1"},{"line_number":77,"context_line":"            will be statistically less than or equal to"},{"line_number":78,"context_line":"            the request completion time between the 2 requests to node 2"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ffe62b97_8861db3c","line":75,"range":{"start_line":75,"start_character":27,"end_line":75,"end_character":40},"updated":"2017-03-23 21:29:30.000000000","message":"The first image download always triggers caching right? And here we say in L73 that the 2 requests succeeded for node 2.\nAm I missing something?","commit_id":"ed1179ac9588a4a9efc001d4eab13876bd8b1f29"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"5fc6ae52e2df8e98ffffe076c4b38321f7f62698","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        Then the 2 requests to API node 1 will succeed"},{"line_number":73,"context_line":"        And the 2 requests to API node 2 will succeed"},{"line_number":74,"context_line":"        And the image will be cached on Glance API node 1"},{"line_number":75,"context_line":"        And the image will not be cached on Glance API node 2"},{"line_number":76,"context_line":"        And the request completion time between the 2 requests to node 1"},{"line_number":77,"context_line":"            will be statistically less than or equal to"},{"line_number":78,"context_line":"            the request completion time between the 2 requests to node 2"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ffe62b97_55e5d536","line":75,"range":{"start_line":75,"start_character":27,"end_line":75,"end_character":40},"in_reply_to":"ffe62b97_8861db3c","updated":"2017-03-29 14:42:31.000000000","message":"Good catch. Fixed.","commit_id":"ed1179ac9588a4a9efc001d4eab13876bd8b1f29"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"d97b5800e12941c280083e25f4468463f92f4741","unresolved":false,"context_lines":[{"line_number":83,"context_line":"Currently, the Glance caching middleware returns an iterator that"},{"line_number":84,"context_line":"downloads from the cache only if the image is already cached. If"},{"line_number":85,"context_line":"the image is uncached, the request is passed onto the API to obtain"},{"line_number":86,"context_line":"an iterator that downloads directly to the store. These iterators"},{"line_number":87,"context_line":"are passed back up through the caching middleware to the WSGI in"},{"line_number":88,"context_line":"the response. If the image is uncached when the middleware"},{"line_number":89,"context_line":"processes a response, it will wrap the iterator from the API in an"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ffe62b97_48451370","line":86,"range":{"start_line":86,"start_character":36,"end_line":86,"end_character":38},"updated":"2017-03-23 21:29:30.000000000","message":"s/to/from","commit_id":"ed1179ac9588a4a9efc001d4eab13876bd8b1f29"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"5fc6ae52e2df8e98ffffe076c4b38321f7f62698","unresolved":false,"context_lines":[{"line_number":83,"context_line":"Currently, the Glance caching middleware returns an iterator that"},{"line_number":84,"context_line":"downloads from the cache only if the image is already cached. If"},{"line_number":85,"context_line":"the image is uncached, the request is passed onto the API to obtain"},{"line_number":86,"context_line":"an iterator that downloads directly to the store. These iterators"},{"line_number":87,"context_line":"are passed back up through the caching middleware to the WSGI in"},{"line_number":88,"context_line":"the response. If the image is uncached when the middleware"},{"line_number":89,"context_line":"processes a response, it will wrap the iterator from the API in an"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ffe62b97_35b93114","line":86,"range":{"start_line":86,"start_character":36,"end_line":86,"end_character":38},"in_reply_to":"ffe62b97_48451370","updated":"2017-03-29 14:42:31.000000000","message":"Done","commit_id":"ed1179ac9588a4a9efc001d4eab13876bd8b1f29"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"d97b5800e12941c280083e25f4468463f92f4741","unresolved":false,"context_lines":[{"line_number":87,"context_line":"are passed back up through the caching middleware to the WSGI in"},{"line_number":88,"context_line":"the response. If the image is uncached when the middleware"},{"line_number":89,"context_line":"processes a response, it will wrap the iterator from the API in an"},{"line_number":90,"context_line":"another iterator that will tee to the cache. This approach is racey"},{"line_number":91,"context_line":"and can result in many responses downloading directly from the"},{"line_number":92,"context_line":"store and a subset of those teeing data to the same location on the"},{"line_number":93,"context_line":"filesystem."},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"One approach to solving this problem is to return an iterator that"},{"line_number":96,"context_line":"will download from the cache for every request regardless if the"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ffe62b97_2bf769f8","line":93,"range":{"start_line":90,"start_character":45,"end_line":93,"end_character":11},"updated":"2017-03-23 21:29:30.000000000","message":"How can both occur?\nIf one request is teeing (to user and cache node), the other requests, unaware of this, a second image download request that comes through will also start teeing and not directly download from store I think.","commit_id":"ed1179ac9588a4a9efc001d4eab13876bd8b1f29"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"5fc6ae52e2df8e98ffffe076c4b38321f7f62698","unresolved":false,"context_lines":[{"line_number":87,"context_line":"are passed back up through the caching middleware to the WSGI in"},{"line_number":88,"context_line":"the response. If the image is uncached when the middleware"},{"line_number":89,"context_line":"processes a response, it will wrap the iterator from the API in an"},{"line_number":90,"context_line":"another iterator that will tee to the cache. This approach is racey"},{"line_number":91,"context_line":"and can result in many responses downloading directly from the"},{"line_number":92,"context_line":"store and a subset of those teeing data to the same location on the"},{"line_number":93,"context_line":"filesystem."},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"One approach to solving this problem is to return an iterator that"},{"line_number":96,"context_line":"will download from the cache for every request regardless if the"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ffe62b97_15caad19","line":93,"range":{"start_line":90,"start_character":45,"end_line":93,"end_character":11},"in_reply_to":"ffe62b97_2bf769f8","updated":"2017-03-29 14:42:31.000000000","message":"Hemanth I had a conversation about this a while back while looking at the code. IIRC, the decision to tee is based on whether writing to the FS has begun yet. Therefore, you can have multiple requests get a tee iterator and multiple requests get the original iterator.\n\nUpdated spec to make this more clear.","commit_id":"ed1179ac9588a4a9efc001d4eab13876bd8b1f29"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"d97b5800e12941c280083e25f4468463f92f4741","unresolved":false,"context_lines":[{"line_number":92,"context_line":"store and a subset of those teeing data to the same location on the"},{"line_number":93,"context_line":"filesystem."},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"One approach to solving this problem is to return an iterator that"},{"line_number":96,"context_line":"will download from the cache for every request regardless if the"},{"line_number":97,"context_line":"image is already cached or not. This iterator would be a waiting"},{"line_number":98,"context_line":"iterator that would return data as it becomes available in the"},{"line_number":99,"context_line":"cache. The caching middleware would be responsible for spawning a"},{"line_number":100,"context_line":"resilient worker / set of workers that safely and reliably"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ffe62b97_cb7fdda9","line":97,"range":{"start_line":95,"start_character":0,"end_line":97,"end_character":31},"updated":"2017-03-23 21:29:30.000000000","message":"This sentence is quite ambiguous. Can we please say how we plan to make the data first available in the cache? i.e., when and how will the caching first be triggered.","commit_id":"ed1179ac9588a4a9efc001d4eab13876bd8b1f29"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"5fc6ae52e2df8e98ffffe076c4b38321f7f62698","unresolved":false,"context_lines":[{"line_number":92,"context_line":"store and a subset of those teeing data to the same location on the"},{"line_number":93,"context_line":"filesystem."},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"One approach to solving this problem is to return an iterator that"},{"line_number":96,"context_line":"will download from the cache for every request regardless if the"},{"line_number":97,"context_line":"image is already cached or not. This iterator would be a waiting"},{"line_number":98,"context_line":"iterator that would return data as it becomes available in the"},{"line_number":99,"context_line":"cache. The caching middleware would be responsible for spawning a"},{"line_number":100,"context_line":"resilient worker / set of workers that safely and reliably"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ffe62b97_ce6b92ee","line":97,"range":{"start_line":95,"start_character":0,"end_line":97,"end_character":31},"in_reply_to":"ffe62b97_cb7fdda9","updated":"2017-03-29 14:42:31.000000000","message":"Done","commit_id":"ed1179ac9588a4a9efc001d4eab13876bd8b1f29"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"d97b5800e12941c280083e25f4468463f92f4741","unresolved":false,"context_lines":[{"line_number":96,"context_line":"will download from the cache for every request regardless if the"},{"line_number":97,"context_line":"image is already cached or not. This iterator would be a waiting"},{"line_number":98,"context_line":"iterator that would return data as it becomes available in the"},{"line_number":99,"context_line":"cache. The caching middleware would be responsible for spawning a"},{"line_number":100,"context_line":"resilient worker / set of workers that safely and reliably"},{"line_number":101,"context_line":"download the image to the cache. Considerations for whether the"},{"line_number":102,"context_line":"image should be downloaded concurrently by chunk or serially and"},{"line_number":103,"context_line":"whether the image should be stored as a single file or segmented"},{"line_number":104,"context_line":"should be made when investigating specific mechanisms to support"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ffe62b97_0b24a5c5","line":101,"range":{"start_line":99,"start_character":7,"end_line":101,"end_character":32},"updated":"2017-03-23 21:29:30.000000000","message":"Move this to the top, explaining how?","commit_id":"ed1179ac9588a4a9efc001d4eab13876bd8b1f29"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"d97b5800e12941c280083e25f4468463f92f4741","unresolved":false,"context_lines":[{"line_number":98,"context_line":"iterator that would return data as it becomes available in the"},{"line_number":99,"context_line":"cache. The caching middleware would be responsible for spawning a"},{"line_number":100,"context_line":"resilient worker / set of workers that safely and reliably"},{"line_number":101,"context_line":"download the image to the cache. Considerations for whether the"},{"line_number":102,"context_line":"image should be downloaded concurrently by chunk or serially and"},{"line_number":103,"context_line":"whether the image should be stored as a single file or segmented"},{"line_number":104,"context_line":"should be made when investigating specific mechanisms to support"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ffe62b97_ebc18182","line":101,"range":{"start_line":101,"start_character":0,"end_line":101,"end_character":8},"updated":"2017-03-23 21:29:30.000000000","message":"download(s)","commit_id":"ed1179ac9588a4a9efc001d4eab13876bd8b1f29"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"5fc6ae52e2df8e98ffffe076c4b38321f7f62698","unresolved":false,"context_lines":[{"line_number":98,"context_line":"iterator that would return data as it becomes available in the"},{"line_number":99,"context_line":"cache. The caching middleware would be responsible for spawning a"},{"line_number":100,"context_line":"resilient worker / set of workers that safely and reliably"},{"line_number":101,"context_line":"download the image to the cache. Considerations for whether the"},{"line_number":102,"context_line":"image should be downloaded concurrently by chunk or serially and"},{"line_number":103,"context_line":"whether the image should be stored as a single file or segmented"},{"line_number":104,"context_line":"should be made when investigating specific mechanisms to support"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ffe62b97_6e7486cf","line":101,"range":{"start_line":101,"start_character":0,"end_line":101,"end_character":8},"in_reply_to":"ffe62b97_ebc18182","updated":"2017-03-29 14:42:31.000000000","message":"Done","commit_id":"ed1179ac9588a4a9efc001d4eab13876bd8b1f29"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"d97b5800e12941c280083e25f4468463f92f4741","unresolved":false,"context_lines":[{"line_number":116,"context_line":"is that some requests might prefer to download directly from the"},{"line_number":117,"context_line":"store rather than the cache. For the purposes of this change, if"},{"line_number":118,"context_line":"the caching middleware is enabled, all requests will be downloaded"},{"line_number":119,"context_line":"from the cache."},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"Note that in the problem description there is reference to a"},{"line_number":122,"context_line":"configuration option ``disable_duplicate_downloads``. This is"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ffe62b97_0b7dc51b","line":119,"range":{"start_line":119,"start_character":0,"end_line":119,"end_character":15},"updated":"2017-03-23 21:29:30.000000000","message":"s/from/only from","commit_id":"ed1179ac9588a4a9efc001d4eab13876bd8b1f29"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"5fc6ae52e2df8e98ffffe076c4b38321f7f62698","unresolved":false,"context_lines":[{"line_number":116,"context_line":"is that some requests might prefer to download directly from the"},{"line_number":117,"context_line":"store rather than the cache. For the purposes of this change, if"},{"line_number":118,"context_line":"the caching middleware is enabled, all requests will be downloaded"},{"line_number":119,"context_line":"from the cache."},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"Note that in the problem description there is reference to a"},{"line_number":122,"context_line":"configuration option ``disable_duplicate_downloads``. This is"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ffe62b97_ee51b637","line":119,"range":{"start_line":119,"start_character":0,"end_line":119,"end_character":15},"in_reply_to":"ffe62b97_0b7dc51b","updated":"2017-03-29 14:42:31.000000000","message":"only feels extraneous","commit_id":"ed1179ac9588a4a9efc001d4eab13876bd8b1f29"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"d97b5800e12941c280083e25f4468463f92f4741","unresolved":false,"context_lines":[{"line_number":117,"context_line":"store rather than the cache. For the purposes of this change, if"},{"line_number":118,"context_line":"the caching middleware is enabled, all requests will be downloaded"},{"line_number":119,"context_line":"from the cache."},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"Note that in the problem description there is reference to a"},{"line_number":122,"context_line":"configuration option ``disable_duplicate_downloads``. This is"},{"line_number":123,"context_line":"useful for describing the problem. However, the addition of a"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ffe62b97_cbd91d23","line":120,"updated":"2017-03-23 21:29:30.000000000","message":"We have not spoken about the cache failures yet with this proposed change in this spec. So here we are basically telling that all the requests will depend on the image data that will always be pre cached.\nWe should also describe and document clearly what we will do, how we plan to handle a failure in that initial caching.\nWhat if a request or multiple requests come when the middleware does not have the cached data for that image ready yet?\nWill we enable the incoming request try after the waiting iterator is unable to serve these other requests? Or will we let a direct download from store go through?","commit_id":"ed1179ac9588a4a9efc001d4eab13876bd8b1f29"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"5fc6ae52e2df8e98ffffe076c4b38321f7f62698","unresolved":false,"context_lines":[{"line_number":117,"context_line":"store rather than the cache. For the purposes of this change, if"},{"line_number":118,"context_line":"the caching middleware is enabled, all requests will be downloaded"},{"line_number":119,"context_line":"from the cache."},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"Note that in the problem description there is reference to a"},{"line_number":122,"context_line":"configuration option ``disable_duplicate_downloads``. This is"},{"line_number":123,"context_line":"useful for describing the problem. However, the addition of a"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ffe62b97_a97168aa","line":120,"in_reply_to":"ffe62b97_cbd91d23","updated":"2017-03-29 14:42:31.000000000","message":"I provided more details on how this would work. Let me know if this covers your questions.","commit_id":"ed1179ac9588a4a9efc001d4eab13876bd8b1f29"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"d97b5800e12941c280083e25f4468463f92f4741","unresolved":false,"context_lines":[{"line_number":122,"context_line":"configuration option ``disable_duplicate_downloads``. This is"},{"line_number":123,"context_line":"useful for describing the problem. However, the addition of a"},{"line_number":124,"context_line":"configuration option to control how the caching middleware behaves"},{"line_number":125,"context_line":"puts unnecessary burden on the operator. The caching middleware"},{"line_number":126,"context_line":"should meet the expected behaviors as outlined in the problem"},{"line_number":127,"context_line":"description without introducing a new configuration option. The"},{"line_number":128,"context_line":"only value of such option is to allow a phased roll-out of the"},{"line_number":129,"context_line":"feature. If the consensus is to introduce such an option, being"},{"line_number":130,"context_line":"defaulted to disabled, it should then be deprecated and defaulted"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ffe62b97_6b7d71e6","line":127,"range":{"start_line":125,"start_character":41,"end_line":127,"end_character":58},"updated":"2017-03-23 21:29:30.000000000","message":"Agreed. Marking it deprecated while implementing this spec is a good idea.","commit_id":"ed1179ac9588a4a9efc001d4eab13876bd8b1f29"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"d97b5800e12941c280083e25f4468463f92f4741","unresolved":false,"context_lines":[{"line_number":138,"context_line":"   This ensures only the first request to reach the response"},{"line_number":139,"context_line":"   handler results in the data being downloaded from the object"},{"line_number":140,"context_line":"   store. All other requests will stream from the cache."},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"   Update the cache middleware request handler to return a waiting"},{"line_number":143,"context_line":"   iterator (see below) if the image is cached or caching. This is"},{"line_number":144,"context_line":"   an optimization to prevent requests unnecessarily reaching the"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ffe62b97_3626b0b9","line":141,"updated":"2017-03-23 21:29:30.000000000","message":"Can we mention a line about what will happen to concurrent requests in this case?\nSay we get 5 concurrent requests for an uncached image. The first request triggers the caching. At this point, how will the waiting iterator work with the other 4 requests?","commit_id":"ed1179ac9588a4a9efc001d4eab13876bd8b1f29"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"5fc6ae52e2df8e98ffffe076c4b38321f7f62698","unresolved":false,"context_lines":[{"line_number":138,"context_line":"   This ensures only the first request to reach the response"},{"line_number":139,"context_line":"   handler results in the data being downloaded from the object"},{"line_number":140,"context_line":"   store. All other requests will stream from the cache."},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"   Update the cache middleware request handler to return a waiting"},{"line_number":143,"context_line":"   iterator (see below) if the image is cached or caching. This is"},{"line_number":144,"context_line":"   an optimization to prevent requests unnecessarily reaching the"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ffe62b97_c9db8c4c","line":141,"in_reply_to":"ffe62b97_3626b0b9","updated":"2017-03-29 14:42:31.000000000","message":"I think this is fully covered in the following paragraphs. I\u0027m not sure what\u0027s missing.","commit_id":"ed1179ac9588a4a9efc001d4eab13876bd8b1f29"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"d97b5800e12941c280083e25f4468463f92f4741","unresolved":false,"context_lines":[{"line_number":176,"context_line":"   failures and improves performance when a large number of image"},{"line_number":177,"context_line":"   download requests are made. It comes at the cost of all"},{"line_number":178,"context_line":"   downloads occurring while an image is being cached depending on"},{"line_number":179,"context_line":"   that single cache to be successful. This means a cache failure"},{"line_number":180,"context_line":"   could result in more clients needing to retry, potentially"},{"line_number":181,"context_line":"   after waiting for nearly the entire image to download."},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"2. Create a lock within the middleware request handler: This"},{"line_number":184,"context_line":"   prevents requests from reaching the root app and establishing a"}],"source_content_type":"text/x-rst","patch_set":13,"id":"ffe62b97_965fbce4","line":181,"range":{"start_line":179,"start_character":39,"end_line":181,"end_character":57},"updated":"2017-03-23 21:29:30.000000000","message":"This is one thing we have to pay a lot of attention to.","commit_id":"ed1179ac9588a4a9efc001d4eab13876bd8b1f29"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"1829789f184c601d747dd1fd8f05d4166eb87c7a","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        And the requested image exists in the object store"},{"line_number":35,"context_line":"        And the requested image is uncached on the Glance API node"},{"line_number":36,"context_line":"        When \u003cn\u003e concurrent request(s) for the image is/are made"},{"line_number":37,"context_line":"        And disable_duplicate_downloads is \u003cenabled\u003e"},{"line_number":38,"context_line":"        Then the image will be downloaded from the object store \u003cm\u003e times"},{"line_number":39,"context_line":"        And the image will be cached on the Glance API node"},{"line_number":40,"context_line":"        And every request for the image will succeed"}],"source_content_type":"text/x-rst","patch_set":14,"id":"dfeb2761_23cb0954","line":37,"range":{"start_line":37,"start_character":12,"end_line":37,"end_character":39},"updated":"2017-03-30 23:12:58.000000000","message":"can we use \"eliminate_duplicate_downloads\" ?","commit_id":"78412c48d5b21c0bd60926de86d768077acec2f4"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"25fbcb533e869027c60246bc57af7fcea623fef2","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        And the requested image exists in the object store"},{"line_number":35,"context_line":"        And the requested image is uncached on the Glance API node"},{"line_number":36,"context_line":"        When \u003cn\u003e concurrent request(s) for the image is/are made"},{"line_number":37,"context_line":"        And disable_duplicate_downloads is \u003cenabled\u003e"},{"line_number":38,"context_line":"        Then the image will be downloaded from the object store \u003cm\u003e times"},{"line_number":39,"context_line":"        And the image will be cached on the Glance API node"},{"line_number":40,"context_line":"        And every request for the image will succeed"}],"source_content_type":"text/x-rst","patch_set":14,"id":"bff0334d_ee45da18","line":37,"range":{"start_line":37,"start_character":12,"end_line":37,"end_character":39},"in_reply_to":"dfeb2761_23cb0954","updated":"2017-04-06 15:54:32.000000000","message":"Done","commit_id":"78412c48d5b21c0bd60926de86d768077acec2f4"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"1829789f184c601d747dd1fd8f05d4166eb87c7a","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"Therefore, depending on the state of the cache, one of three"},{"line_number":93,"context_line":"iterators can be returned: an iterator to the cache (if the image"},{"line_number":94,"context_line":"is completely cached), an iterator to the store (if the image is"},{"line_number":95,"context_line":"completely uncached), or a teeing iterator to the cache (if the"},{"line_number":96,"context_line":"image is partially cached).  This approach is racey and can result"},{"line_number":97,"context_line":"in many responses downloading directly from the store and a subset"},{"line_number":98,"context_line":"of those teeing data to the same location on the filesystem."},{"line_number":99,"context_line":""}],"source_content_type":"text/x-rst","patch_set":14,"id":"dfeb2761_233b09d2","line":96,"range":{"start_line":94,"start_character":23,"end_line":96,"end_character":27},"updated":"2017-03-30 23:12:58.000000000","message":"I am not sure this is what is happening. If completely uncached, a teeing iterator is returned (tee to cache and the user from the store). Please correct me if I am wrong.","commit_id":"78412c48d5b21c0bd60926de86d768077acec2f4"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"f79227fa21fec79d37723ec30348b68cfe7d933c","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"Therefore, depending on the state of the cache, one of three"},{"line_number":93,"context_line":"iterators can be returned: an iterator to the cache (if the image"},{"line_number":94,"context_line":"is completely cached), an iterator to the store (if the image is"},{"line_number":95,"context_line":"completely uncached), or a teeing iterator to the cache (if the"},{"line_number":96,"context_line":"image is partially cached).  This approach is racey and can result"},{"line_number":97,"context_line":"in many responses downloading directly from the store and a subset"},{"line_number":98,"context_line":"of those teeing data to the same location on the filesystem."},{"line_number":99,"context_line":""}],"source_content_type":"text/x-rst","patch_set":14,"id":"bff0334d_4adec011","line":96,"range":{"start_line":94,"start_character":23,"end_line":96,"end_character":27},"in_reply_to":"bff0334d_d8d09cfa","updated":"2017-04-07 16:32:52.000000000","message":"Thanks","commit_id":"78412c48d5b21c0bd60926de86d768077acec2f4"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"25fbcb533e869027c60246bc57af7fcea623fef2","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"Therefore, depending on the state of the cache, one of three"},{"line_number":93,"context_line":"iterators can be returned: an iterator to the cache (if the image"},{"line_number":94,"context_line":"is completely cached), an iterator to the store (if the image is"},{"line_number":95,"context_line":"completely uncached), or a teeing iterator to the cache (if the"},{"line_number":96,"context_line":"image is partially cached).  This approach is racey and can result"},{"line_number":97,"context_line":"in many responses downloading directly from the store and a subset"},{"line_number":98,"context_line":"of those teeing data to the same location on the filesystem."},{"line_number":99,"context_line":""}],"source_content_type":"text/x-rst","patch_set":14,"id":"bff0334d_d8d09cfa","line":96,"range":{"start_line":94,"start_character":23,"end_line":96,"end_character":27},"in_reply_to":"dfeb2761_233b09d2","updated":"2017-04-06 15:54:32.000000000","message":"This is incorrect as currently written. I accidentally wrote this backwards. Let me fix and make more clear.","commit_id":"78412c48d5b21c0bd60926de86d768077acec2f4"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"1829789f184c601d747dd1fd8f05d4166eb87c7a","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"Ideally, any image download request that is received, regardless"},{"line_number":101,"context_line":"of cache state, would both encounter the same interface and"},{"line_number":102,"context_line":"execute the same steps to retrieve the image. We currently adhere"},{"line_number":103,"context_line":"to the former, but not the latter. This introduces unnecessary"},{"line_number":104,"context_line":"complexity into the system. This complexity can be removed by"},{"line_number":105,"context_line":"refactoring the middleware to fully encapsulate any work to"}],"source_content_type":"text/x-rst","patch_set":14,"id":"dfeb2761_e3be41fe","line":102,"range":{"start_line":102,"start_character":12,"end_line":102,"end_character":22},"updated":"2017-03-30 23:12:58.000000000","message":"what steps?","commit_id":"78412c48d5b21c0bd60926de86d768077acec2f4"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"25fbcb533e869027c60246bc57af7fcea623fef2","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"Ideally, any image download request that is received, regardless"},{"line_number":101,"context_line":"of cache state, would both encounter the same interface and"},{"line_number":102,"context_line":"execute the same steps to retrieve the image. We currently adhere"},{"line_number":103,"context_line":"to the former, but not the latter. This introduces unnecessary"},{"line_number":104,"context_line":"complexity into the system. This complexity can be removed by"},{"line_number":105,"context_line":"refactoring the middleware to fully encapsulate any work to"}],"source_content_type":"text/x-rst","patch_set":14,"id":"bff0334d_98e454ae","line":102,"range":{"start_line":102,"start_character":12,"end_line":102,"end_character":22},"in_reply_to":"dfeb2761_e3be41fe","updated":"2017-04-06 15:54:32.000000000","message":"code path","commit_id":"78412c48d5b21c0bd60926de86d768077acec2f4"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"1829789f184c601d747dd1fd8f05d4166eb87c7a","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"Ideally, any image download request that is received, regardless"},{"line_number":101,"context_line":"of cache state, would both encounter the same interface and"},{"line_number":102,"context_line":"execute the same steps to retrieve the image. We currently adhere"},{"line_number":103,"context_line":"to the former, but not the latter. This introduces unnecessary"},{"line_number":104,"context_line":"complexity into the system. This complexity can be removed by"},{"line_number":105,"context_line":"refactoring the middleware to fully encapsulate any work to"},{"line_number":106,"context_line":"retrieve the image from the store and write it to the cache. While"}],"source_content_type":"text/x-rst","patch_set":14,"id":"dfeb2761_83d6554f","line":103,"range":{"start_line":102,"start_character":46,"end_line":103,"end_character":34},"updated":"2017-03-30 23:12:58.000000000","message":"I am sorry for such nit picks. But having something in a new paragraph and saying \"former\" and \"latter\" is confusing.","commit_id":"78412c48d5b21c0bd60926de86d768077acec2f4"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"25fbcb533e869027c60246bc57af7fcea623fef2","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"Ideally, any image download request that is received, regardless"},{"line_number":101,"context_line":"of cache state, would both encounter the same interface and"},{"line_number":102,"context_line":"execute the same steps to retrieve the image. We currently adhere"},{"line_number":103,"context_line":"to the former, but not the latter. This introduces unnecessary"},{"line_number":104,"context_line":"complexity into the system. This complexity can be removed by"},{"line_number":105,"context_line":"refactoring the middleware to fully encapsulate any work to"},{"line_number":106,"context_line":"retrieve the image from the store and write it to the cache. While"}],"source_content_type":"text/x-rst","patch_set":14,"id":"bff0334d_38366805","line":103,"range":{"start_line":102,"start_character":46,"end_line":103,"end_character":34},"in_reply_to":"dfeb2761_83d6554f","updated":"2017-04-06 15:54:32.000000000","message":"refers to the previous sentence. I will make it more clear","commit_id":"78412c48d5b21c0bd60926de86d768077acec2f4"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"1829789f184c601d747dd1fd8f05d4166eb87c7a","unresolved":false,"context_lines":[{"line_number":101,"context_line":"of cache state, would both encounter the same interface and"},{"line_number":102,"context_line":"execute the same steps to retrieve the image. We currently adhere"},{"line_number":103,"context_line":"to the former, but not the latter. This introduces unnecessary"},{"line_number":104,"context_line":"complexity into the system. This complexity can be removed by"},{"line_number":105,"context_line":"refactoring the middleware to fully encapsulate any work to"},{"line_number":106,"context_line":"retrieve the image from the store and write it to the cache. While"},{"line_number":107,"context_line":"the exact mechanism for achieving this might vary, one example of"},{"line_number":108,"context_line":"how this can be achieved follows:"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-rst","patch_set":14,"id":"dfeb2761_432ccd46","line":106,"range":{"start_line":104,"start_character":28,"end_line":106,"end_character":60},"updated":"2017-03-30 23:12:58.000000000","message":"Since this is the main proposed solution, move it to a separate paragraph stating that this is our solution.","commit_id":"78412c48d5b21c0bd60926de86d768077acec2f4"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"25fbcb533e869027c60246bc57af7fcea623fef2","unresolved":false,"context_lines":[{"line_number":101,"context_line":"of cache state, would both encounter the same interface and"},{"line_number":102,"context_line":"execute the same steps to retrieve the image. We currently adhere"},{"line_number":103,"context_line":"to the former, but not the latter. This introduces unnecessary"},{"line_number":104,"context_line":"complexity into the system. This complexity can be removed by"},{"line_number":105,"context_line":"refactoring the middleware to fully encapsulate any work to"},{"line_number":106,"context_line":"retrieve the image from the store and write it to the cache. While"},{"line_number":107,"context_line":"the exact mechanism for achieving this might vary, one example of"},{"line_number":108,"context_line":"how this can be achieved follows:"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-rst","patch_set":14,"id":"bff0334d_6e51cad8","line":106,"range":{"start_line":104,"start_character":28,"end_line":106,"end_character":60},"in_reply_to":"dfeb2761_432ccd46","updated":"2017-04-06 15:54:32.000000000","message":"Done","commit_id":"78412c48d5b21c0bd60926de86d768077acec2f4"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"1829789f184c601d747dd1fd8f05d4166eb87c7a","unresolved":false,"context_lines":[{"line_number":106,"context_line":"retrieve the image from the store and write it to the cache. While"},{"line_number":107,"context_line":"the exact mechanism for achieving this might vary, one example of"},{"line_number":108,"context_line":"how this can be achieved follows:"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":".. code-block:: python"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    if the cache file does not exist:"}],"source_content_type":"text/x-rst","patch_set":14,"id":"dfeb2761_e3f2c19a","line":109,"updated":"2017-03-30 23:12:58.000000000","message":"I liked the sentence in the previous PS where you said that the proposal was to download from cache no matter what.\nThat sentence is hidden somewhere implicitly now with all the details.\n\nCan we please tell clearly in a new paragraph that:\n\"\"\"\nThe proposal is to serve the download requests from the cache, irrespective of whether the image is already cached or not. This will be achieved by pre caching the image from the store.\n\nIf a requests comes in during this pre-cache process, we return a waiting iterator. If not, we simply return a cache iterator  (directly serve from cache).\n\"\"\"","commit_id":"78412c48d5b21c0bd60926de86d768077acec2f4"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"25fbcb533e869027c60246bc57af7fcea623fef2","unresolved":false,"context_lines":[{"line_number":106,"context_line":"retrieve the image from the store and write it to the cache. While"},{"line_number":107,"context_line":"the exact mechanism for achieving this might vary, one example of"},{"line_number":108,"context_line":"how this can be achieved follows:"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":".. code-block:: python"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    if the cache file does not exist:"}],"source_content_type":"text/x-rst","patch_set":14,"id":"bff0334d_4bb838c7","line":109,"in_reply_to":"dfeb2761_e3f2c19a","updated":"2017-04-06 15:54:32.000000000","message":"I\u0027ll refactor it to be more clear.","commit_id":"78412c48d5b21c0bd60926de86d768077acec2f4"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"1829789f184c601d747dd1fd8f05d4166eb87c7a","unresolved":false,"context_lines":[{"line_number":108,"context_line":"how this can be achieved follows:"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":".. code-block:: python"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    if the cache file does not exist:"},{"line_number":113,"context_line":"        create it"},{"line_number":114,"context_line":"        spawn a worker"}],"source_content_type":"text/x-rst","patch_set":14,"id":"dfeb2761_23a2e99b","line":111,"updated":"2017-03-30 23:12:58.000000000","message":"How about:\n\n  if eliminate_duplicate_downloads:\n      if not cache_file:\n          create_cache_file\n          return waiting_iterator\n      else:\n          return cache_iterator","commit_id":"78412c48d5b21c0bd60926de86d768077acec2f4"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"f79227fa21fec79d37723ec30348b68cfe7d933c","unresolved":false,"context_lines":[{"line_number":108,"context_line":"how this can be achieved follows:"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":".. code-block:: python"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    if the cache file does not exist:"},{"line_number":113,"context_line":"        create it"},{"line_number":114,"context_line":"        spawn a worker"}],"source_content_type":"text/x-rst","patch_set":14,"id":"bff0334d_0a01d86b","line":111,"in_reply_to":"bff0334d_cbcb2851","updated":"2017-04-07 16:32:52.000000000","message":"Hmmm, I was wondering if it was worth differentiating them. But I guess like what you have in PS 15. Lets see what others have to say.","commit_id":"78412c48d5b21c0bd60926de86d768077acec2f4"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"25fbcb533e869027c60246bc57af7fcea623fef2","unresolved":false,"context_lines":[{"line_number":108,"context_line":"how this can be achieved follows:"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":".. code-block:: python"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    if the cache file does not exist:"},{"line_number":113,"context_line":"        create it"},{"line_number":114,"context_line":"        spawn a worker"}],"source_content_type":"text/x-rst","patch_set":14,"id":"bff0334d_cbcb2851","line":111,"in_reply_to":"dfeb2761_23a2e99b","updated":"2017-04-06 15:54:32.000000000","message":"We can use a waiting_iterator regardless if the image is fully cached or not. It works in all cases.","commit_id":"78412c48d5b21c0bd60926de86d768077acec2f4"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"d81ffd65e9ecfc9a4ca2bcdb0dc72f4245579ceb","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Multiple requests for an image that is not yet cached on the Glance"},{"line_number":16,"context_line":"API node handling the request currently results in multiple"},{"line_number":17,"context_line":"download requests for the same image from the object store. For"},{"line_number":18,"context_line":"example, 1000 concurrent build requests based off an uncached image"},{"line_number":19,"context_line":"can result in 1000 download requests from the object store."},{"line_number":20,"context_line":""}],"source_content_type":"text/x-rst","patch_set":15,"id":"bff0334d_6fb4f635","line":17,"range":{"start_line":17,"start_character":46,"end_line":17,"end_character":52},"updated":"2017-04-07 16:22:44.000000000","message":"Why say object store? Just \"backend store\" will do.","commit_id":"864a1a9dbb6ad8af5a5693e9ca6b2150deb84425"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"8b87e9bbfd40a2c7e8cbd7e3569e0c19c578fc1c","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Multiple requests for an image that is not yet cached on the Glance"},{"line_number":16,"context_line":"API node handling the request currently results in multiple"},{"line_number":17,"context_line":"download requests for the same image from the object store. For"},{"line_number":18,"context_line":"example, 1000 concurrent build requests based off an uncached image"},{"line_number":19,"context_line":"can result in 1000 download requests from the object store."},{"line_number":20,"context_line":""}],"source_content_type":"text/x-rst","patch_set":15,"id":"bff0334d_a91f70b5","line":17,"range":{"start_line":17,"start_character":46,"end_line":17,"end_character":52},"in_reply_to":"bff0334d_6fb4f635","updated":"2017-04-10 13:47:05.000000000","message":"Done","commit_id":"864a1a9dbb6ad8af5a5693e9ca6b2150deb84425"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"d81ffd65e9ecfc9a4ca2bcdb0dc72f4245579ceb","unresolved":false,"context_lines":[{"line_number":16,"context_line":"API node handling the request currently results in multiple"},{"line_number":17,"context_line":"download requests for the same image from the object store. For"},{"line_number":18,"context_line":"example, 1000 concurrent build requests based off an uncached image"},{"line_number":19,"context_line":"can result in 1000 download requests from the object store."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":15,"id":"bff0334d_af931ea3","line":19,"range":{"start_line":19,"start_character":46,"end_line":19,"end_character":58},"updated":"2017-04-07 16:22:44.000000000","message":"backend store. Also in all other references in this file.","commit_id":"864a1a9dbb6ad8af5a5693e9ca6b2150deb84425"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"8b87e9bbfd40a2c7e8cbd7e3569e0c19c578fc1c","unresolved":false,"context_lines":[{"line_number":16,"context_line":"API node handling the request currently results in multiple"},{"line_number":17,"context_line":"download requests for the same image from the object store. For"},{"line_number":18,"context_line":"example, 1000 concurrent build requests based off an uncached image"},{"line_number":19,"context_line":"can result in 1000 download requests from the object store."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":15,"id":"bff0334d_891cacc1","line":19,"range":{"start_line":19,"start_character":46,"end_line":19,"end_character":58},"in_reply_to":"bff0334d_af931ea3","updated":"2017-04-10 13:47:05.000000000","message":"Done","commit_id":"864a1a9dbb6ad8af5a5693e9ca6b2150deb84425"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"d81ffd65e9ecfc9a4ca2bcdb0dc72f4245579ceb","unresolved":false,"context_lines":[{"line_number":25,"context_line":"Feature: Elasticity"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    In order to briefly leverage the power of the Cloud to do some work,"},{"line_number":28,"context_line":"    As an OpenStack Powered Cloud customer leveraging Glance caching"},{"line_number":29,"context_line":"    I want to quickly provision a large number of servers, perform some"},{"line_number":30,"context_line":"    work, and then destroy them."},{"line_number":31,"context_line":""}],"source_content_type":"text/x-rst","patch_set":15,"id":"bff0334d_2fedce24","line":28,"range":{"start_line":28,"start_character":4,"end_line":28,"end_character":6},"updated":"2017-04-07 16:22:44.000000000","message":"nit: as","commit_id":"864a1a9dbb6ad8af5a5693e9ca6b2150deb84425"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"8b87e9bbfd40a2c7e8cbd7e3569e0c19c578fc1c","unresolved":false,"context_lines":[{"line_number":25,"context_line":"Feature: Elasticity"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    In order to briefly leverage the power of the Cloud to do some work,"},{"line_number":28,"context_line":"    As an OpenStack Powered Cloud customer leveraging Glance caching"},{"line_number":29,"context_line":"    I want to quickly provision a large number of servers, perform some"},{"line_number":30,"context_line":"    work, and then destroy them."},{"line_number":31,"context_line":""}],"source_content_type":"text/x-rst","patch_set":15,"id":"bff0334d_09b53ccd","line":28,"range":{"start_line":28,"start_character":4,"end_line":28,"end_character":6},"in_reply_to":"bff0334d_2fedce24","updated":"2017-04-10 13:47:05.000000000","message":"As is intentional here","commit_id":"864a1a9dbb6ad8af5a5693e9ca6b2150deb84425"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"d81ffd65e9ecfc9a4ca2bcdb0dc72f4245579ceb","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        Examples: Concurrent Requests"},{"line_number":60,"context_line":"            | n | enabled  | will     |"},{"line_number":61,"context_line":"            | 2 | enabled  | will     |"},{"line_number":62,"context_line":"            | 2 | disabled | will not |"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    Scenario: Stream to all requests while caching"}],"source_content_type":"text/x-rst","patch_set":15,"id":"bff0334d_aa654ce3","line":61,"range":{"start_line":61,"start_character":29,"end_line":61,"end_character":34},"updated":"2017-04-07 16:22:44.000000000","message":"I do not understand how this is True.\nAs per the proposed solution: the image will be pre-cached or if not, the first request will trigger the cache. So if mid-download, the client closed the connection and the cache failed for the first request, the second is going to be have a broken waiting iterator.\nHow are we going to break out of this and do a retry for the second request which will actually cause the image to get cached?\nThis scenario is worth explaining in the proposed change below.","commit_id":"864a1a9dbb6ad8af5a5693e9ca6b2150deb84425"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"8b87e9bbfd40a2c7e8cbd7e3569e0c19c578fc1c","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        Examples: Concurrent Requests"},{"line_number":60,"context_line":"            | n | enabled  | will     |"},{"line_number":61,"context_line":"            | 2 | enabled  | will     |"},{"line_number":62,"context_line":"            | 2 | disabled | will not |"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    Scenario: Stream to all requests while caching"}],"source_content_type":"text/x-rst","patch_set":15,"id":"bff0334d_a99090ee","line":61,"range":{"start_line":61,"start_character":29,"end_line":61,"end_character":34},"in_reply_to":"bff0334d_aa654ce3","updated":"2017-04-10 13:47:05.000000000","message":"Dharini, what you describe is more reflective of the first alternative, but not the proposed solution. With the proposed solution, any request that arrives when the image is not cached will trigger a cache miss prompting the caching middleware to spawn a worker to cache the image. The logic to cache the image will be in a worker not in the returned iterator. The iterator would be a waiting iterator that would read from the cache. If any download request fails, it will not impact the caching and is completely independent of the worker. This was one of the primary motivations for not using alternative one which is more complex and instead pivoting to the current proposed solution.\n\nClarification added around line 158.","commit_id":"864a1a9dbb6ad8af5a5693e9ca6b2150deb84425"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"d81ffd65e9ecfc9a4ca2bcdb0dc72f4245579ceb","unresolved":false,"context_lines":[{"line_number":83,"context_line":"Currently, the Glance caching middleware returns an iterator that"},{"line_number":84,"context_line":"downloads from the cache only if the image is already cached. If"},{"line_number":85,"context_line":"the image is uncached, the request is passed onto the API to"},{"line_number":86,"context_line":"obtain an iterator that downloads directly from the store. These"},{"line_number":87,"context_line":"iterators are passed back up through the caching middleware to the"},{"line_number":88,"context_line":"WSGI in the response. If the image is completely uncached when the"},{"line_number":89,"context_line":"middleware processes a response, it will wrap the iterator from"}],"source_content_type":"text/x-rst","patch_set":15,"id":"bff0334d_2f8eee2d","line":86,"range":{"start_line":86,"start_character":57,"end_line":86,"end_character":58},"updated":"2017-04-07 16:22:44.000000000","message":"and then caches that image.","commit_id":"864a1a9dbb6ad8af5a5693e9ca6b2150deb84425"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"8b87e9bbfd40a2c7e8cbd7e3569e0c19c578fc1c","unresolved":false,"context_lines":[{"line_number":83,"context_line":"Currently, the Glance caching middleware returns an iterator that"},{"line_number":84,"context_line":"downloads from the cache only if the image is already cached. If"},{"line_number":85,"context_line":"the image is uncached, the request is passed onto the API to"},{"line_number":86,"context_line":"obtain an iterator that downloads directly from the store. These"},{"line_number":87,"context_line":"iterators are passed back up through the caching middleware to the"},{"line_number":88,"context_line":"WSGI in the response. If the image is completely uncached when the"},{"line_number":89,"context_line":"middleware processes a response, it will wrap the iterator from"}],"source_content_type":"text/x-rst","patch_set":15,"id":"bff0334d_4c3eb28c","line":86,"range":{"start_line":86,"start_character":57,"end_line":86,"end_character":58},"in_reply_to":"bff0334d_2f8eee2d","updated":"2017-04-10 13:47:05.000000000","message":"Refactored paragraph to be more clear.","commit_id":"864a1a9dbb6ad8af5a5693e9ca6b2150deb84425"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"d81ffd65e9ecfc9a4ca2bcdb0dc72f4245579ceb","unresolved":false,"context_lines":[{"line_number":85,"context_line":"the image is uncached, the request is passed onto the API to"},{"line_number":86,"context_line":"obtain an iterator that downloads directly from the store. These"},{"line_number":87,"context_line":"iterators are passed back up through the caching middleware to the"},{"line_number":88,"context_line":"WSGI in the response. If the image is completely uncached when the"},{"line_number":89,"context_line":"middleware processes a response, it will wrap the iterator from"},{"line_number":90,"context_line":"the API in an another iterator that will tee to the cache."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"Therefore, depending on the state of the cache, one of three"},{"line_number":93,"context_line":"iterators can be returned: an iterator to the cache (if the image"}],"source_content_type":"text/x-rst","patch_set":15,"id":"bff0334d_8fadfa89","line":90,"range":{"start_line":88,"start_character":22,"end_line":90,"end_character":58},"updated":"2017-04-07 16:22:44.000000000","message":"This sentence is redundant. Please combine with the first sentence.","commit_id":"864a1a9dbb6ad8af5a5693e9ca6b2150deb84425"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"8b87e9bbfd40a2c7e8cbd7e3569e0c19c578fc1c","unresolved":false,"context_lines":[{"line_number":85,"context_line":"the image is uncached, the request is passed onto the API to"},{"line_number":86,"context_line":"obtain an iterator that downloads directly from the store. These"},{"line_number":87,"context_line":"iterators are passed back up through the caching middleware to the"},{"line_number":88,"context_line":"WSGI in the response. If the image is completely uncached when the"},{"line_number":89,"context_line":"middleware processes a response, it will wrap the iterator from"},{"line_number":90,"context_line":"the API in an another iterator that will tee to the cache."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"Therefore, depending on the state of the cache, one of three"},{"line_number":93,"context_line":"iterators can be returned: an iterator to the cache (if the image"}],"source_content_type":"text/x-rst","patch_set":15,"id":"bff0334d_2c3fee87","line":90,"range":{"start_line":88,"start_character":22,"end_line":90,"end_character":58},"in_reply_to":"bff0334d_8fadfa89","updated":"2017-04-10 13:47:05.000000000","message":"Refactored paragraph","commit_id":"864a1a9dbb6ad8af5a5693e9ca6b2150deb84425"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"63393da94ff9047ec088de073fb273b42aed1011","unresolved":false,"context_lines":[{"line_number":5,"context_line":" http://creativecommons.org/licenses/by/3.0/legalcode"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":8,"context_line":"Duplicate Downloads"},{"line_number":9,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Include the URL of your launchpad blueprint:"}],"source_content_type":"text/x-rst","patch_set":16,"id":"bff0334d_518f0529","line":8,"range":{"start_line":8,"start_character":0,"end_line":8,"end_character":19},"updated":"2017-04-12 22:00:35.000000000","message":"Nit: change this to \"Eliminate Redundant Downloads of Uncached Images\" or at least \"Eliminate Duplicate Downloads\"","commit_id":"a4f6274b9e28a1e3831ef40c0347d167b9f3376b"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"7dc29045d3d680fe869e938df167db44489dede1","unresolved":false,"context_lines":[{"line_number":5,"context_line":" http://creativecommons.org/licenses/by/3.0/legalcode"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":8,"context_line":"Duplicate Downloads"},{"line_number":9,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Include the URL of your launchpad blueprint:"}],"source_content_type":"text/x-rst","patch_set":16,"id":"7ffa3b31_24bc3668","line":8,"range":{"start_line":8,"start_character":0,"end_line":8,"end_character":19},"in_reply_to":"bff0334d_518f0529","updated":"2017-04-13 21:30:19.000000000","message":"Done","commit_id":"a4f6274b9e28a1e3831ef40c0347d167b9f3376b"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"63393da94ff9047ec088de073fb273b42aed1011","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    work, and then destroy them."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    Scenario Outline: Concurrent Requests for Uncached Image"},{"line_number":33,"context_line":"        Given a single Glance API node"},{"line_number":34,"context_line":"        And the requested image exists in the backend store"},{"line_number":35,"context_line":"        And the requested image is uncached on the Glance API node"},{"line_number":36,"context_line":"        When \u003cn\u003e concurrent request(s) for the image is/are made"}],"source_content_type":"text/x-rst","patch_set":16,"id":"9ff52f3f_df0e7b31","line":33,"updated":"2017-04-12 22:00:35.000000000","message":"Note: fix this in a follow up patch\n\nThis formatting isn\u0027t preserved when the doc is rendered.\nIf you preface each line with \u0027| \u0027, sphinx will respect the newlines (as long as the first line begins with a \u0027| \u0027 and the text in each subsequent line is indented at the same level).","commit_id":"a4f6274b9e28a1e3831ef40c0347d167b9f3376b"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"7dc29045d3d680fe869e938df167db44489dede1","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    work, and then destroy them."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    Scenario Outline: Concurrent Requests for Uncached Image"},{"line_number":33,"context_line":"        Given a single Glance API node"},{"line_number":34,"context_line":"        And the requested image exists in the backend store"},{"line_number":35,"context_line":"        And the requested image is uncached on the Glance API node"},{"line_number":36,"context_line":"        When \u003cn\u003e concurrent request(s) for the image is/are made"}],"source_content_type":"text/x-rst","patch_set":16,"id":"7ffa3b31_c4aa3218","line":33,"in_reply_to":"9ff52f3f_df0e7b31","updated":"2017-04-13 21:30:19.000000000","message":"Put in a code block","commit_id":"a4f6274b9e28a1e3831ef40c0347d167b9f3376b"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"63393da94ff9047ec088de073fb273b42aed1011","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        And the requested image exists in the backend store"},{"line_number":35,"context_line":"        And the requested image is uncached on the Glance API node"},{"line_number":36,"context_line":"        When \u003cn\u003e concurrent request(s) for the image is/are made"},{"line_number":37,"context_line":"        And eliminate_duplicate_downloads is \u003cenabled\u003e"},{"line_number":38,"context_line":"        Then the image will be downloaded from the backend store \u003cm\u003e times"},{"line_number":39,"context_line":"        And the image will be cached on the Glance API node"},{"line_number":40,"context_line":"        And every request for the image will succeed"}],"source_content_type":"text/x-rst","patch_set":16,"id":"9ff52f3f_7f19af86","line":37,"range":{"start_line":37,"start_character":8,"end_line":37,"end_character":54},"updated":"2017-04-12 22:00:35.000000000","message":"I don\u0027t know how I feel about this.  See my comment at line 179.","commit_id":"a4f6274b9e28a1e3831ef40c0347d167b9f3376b"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"7dc29045d3d680fe869e938df167db44489dede1","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        And the requested image exists in the backend store"},{"line_number":35,"context_line":"        And the requested image is uncached on the Glance API node"},{"line_number":36,"context_line":"        When \u003cn\u003e concurrent request(s) for the image is/are made"},{"line_number":37,"context_line":"        And eliminate_duplicate_downloads is \u003cenabled\u003e"},{"line_number":38,"context_line":"        Then the image will be downloaded from the backend store \u003cm\u003e times"},{"line_number":39,"context_line":"        And the image will be cached on the Glance API node"},{"line_number":40,"context_line":"        And every request for the image will succeed"}],"source_content_type":"text/x-rst","patch_set":16,"id":"7ffa3b31_8462ea15","line":37,"range":{"start_line":37,"start_character":8,"end_line":37,"end_character":54},"in_reply_to":"9ff52f3f_7f19af86","updated":"2017-04-13 21:30:19.000000000","message":"I moved config option to alternative","commit_id":"a4f6274b9e28a1e3831ef40c0347d167b9f3376b"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"63393da94ff9047ec088de073fb273b42aed1011","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        Then the image will be downloaded from the backend store \u003cm\u003e times"},{"line_number":39,"context_line":"        And the image will be cached on the Glance API node"},{"line_number":40,"context_line":"        And every request for the image will succeed"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        Examples: Concurrent Requests"},{"line_number":43,"context_line":"            | n | enabled  | m |"},{"line_number":44,"context_line":"            | 1 | enabled  | 1 |"}],"source_content_type":"text/x-rst","patch_set":16,"id":"9ff52f3f_bf1a9714","line":41,"updated":"2017-04-12 22:00:35.000000000","message":"nit: should probably fix these so they display as tables (or literal blocks, whatever you prefer)","commit_id":"a4f6274b9e28a1e3831ef40c0347d167b9f3376b"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"7dc29045d3d680fe869e938df167db44489dede1","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        Then the image will be downloaded from the backend store \u003cm\u003e times"},{"line_number":39,"context_line":"        And the image will be cached on the Glance API node"},{"line_number":40,"context_line":"        And every request for the image will succeed"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        Examples: Concurrent Requests"},{"line_number":43,"context_line":"            | n | enabled  | m |"},{"line_number":44,"context_line":"            | 1 | enabled  | 1 |"}],"source_content_type":"text/x-rst","patch_set":16,"id":"7ffa3b31_446ce207","line":41,"in_reply_to":"9ff52f3f_bf1a9714","updated":"2017-04-13 21:30:19.000000000","message":"Moved into code bloxk","commit_id":"a4f6274b9e28a1e3831ef40c0347d167b9f3376b"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"63393da94ff9047ec088de073fb273b42aed1011","unresolved":false,"context_lines":[{"line_number":174,"context_line":"configuration option ``eliminate_duplicate_downloads``. This is"},{"line_number":175,"context_line":"useful for describing the problem. However, the addition of a"},{"line_number":176,"context_line":"configuration option to control how the caching middleware behaves"},{"line_number":177,"context_line":"puts unnecessary burden on the operator. The caching middleware"},{"line_number":178,"context_line":"should meet the expected behaviors as outlined in the problem"},{"line_number":179,"context_line":"description without introducing a new configuration option. The"},{"line_number":180,"context_line":"only value of such option is to allow a phased roll-out of the"},{"line_number":181,"context_line":"feature. If the consensus is to introduce such an option, being"},{"line_number":182,"context_line":"defaulted to disabled, it should then be deprecated and defaulted"}],"source_content_type":"text/x-rst","patch_set":16,"id":"9ff52f3f_5f502b33","line":179,"range":{"start_line":177,"start_character":41,"end_line":179,"end_character":59},"updated":"2017-04-12 22:00:35.000000000","message":"I agree with this.  It sounds like the only reason to introduce the option is just in case this change breaks the cache.  Or do you think there are subtle performance problems that might occur, in which case operators may want to disable the option?  (Though in that case, maybe we wouldn\u0027t want to deprecate and remove the option?)","commit_id":"a4f6274b9e28a1e3831ef40c0347d167b9f3376b"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"7dc29045d3d680fe869e938df167db44489dede1","unresolved":false,"context_lines":[{"line_number":174,"context_line":"configuration option ``eliminate_duplicate_downloads``. This is"},{"line_number":175,"context_line":"useful for describing the problem. However, the addition of a"},{"line_number":176,"context_line":"configuration option to control how the caching middleware behaves"},{"line_number":177,"context_line":"puts unnecessary burden on the operator. The caching middleware"},{"line_number":178,"context_line":"should meet the expected behaviors as outlined in the problem"},{"line_number":179,"context_line":"description without introducing a new configuration option. The"},{"line_number":180,"context_line":"only value of such option is to allow a phased roll-out of the"},{"line_number":181,"context_line":"feature. If the consensus is to introduce such an option, being"},{"line_number":182,"context_line":"defaulted to disabled, it should then be deprecated and defaulted"}],"source_content_type":"text/x-rst","patch_set":16,"id":"7ffa3b31_44450270","line":179,"range":{"start_line":177,"start_character":41,"end_line":179,"end_character":59},"in_reply_to":"9ff52f3f_5f502b33","updated":"2017-04-13 21:30:19.000000000","message":"It was only to make it more palatable to folks that would be concerned about introducing this change in a non-phase out approach. Moved to alternative.","commit_id":"a4f6274b9e28a1e3831ef40c0347d167b9f3376b"}]}
