)]}'
{"cinder/volume/flows/manager/create_volume.py":[{"author":{"_account_id":20146,"name":"yuyafei","email":"yu.yafei@foxmail.com","username":"yuyafei"},"change_message_id":"6c8798575265d7b2fa8a5eb714e7f266ed095300","unresolved":false,"context_lines":[{"line_number":737,"context_line":"        original_size \u003d volume_ref[\u0027size\u0027]"},{"line_number":738,"context_line":"        try:"},{"line_number":739,"context_line":"            if not cloned:"},{"line_number":740,"context_line":"                with image_utils.TemporaryImages.fetch("},{"line_number":741,"context_line":"                        image_service, context, image_id) as tmp_image:"},{"line_number":742,"context_line":"                    # Try to create the volume as the minimal size, then we can"},{"line_number":743,"context_line":"                    # extend once the image has been downloaded."}],"source_content_type":"text/x-python","patch_set":1,"id":"5a9d85d2_a530b602","side":"PARENT","line":740,"range":{"start_line":740,"start_character":49,"end_line":740,"end_character":54},"updated":"2016-06-21 02:00:29.000000000","message":"Fetch image here , then use the tmp_image fetched before in self._create_from_image_download, so there is no redundant image fetch.","commit_id":"ccd410b0aad258be5846882be71283ef0dec3914"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"3f8d03d5d7b734b575b974c91c8307e4f48fec3a","unresolved":false,"context_lines":[{"line_number":761,"context_line":"                            volume_ref.size \u003d virtual_size"},{"line_number":762,"context_line":"                            volume_ref.save()"},{"line_number":763,"context_line":""},{"line_number":764,"context_line":"                model_update \u003d self._create_from_image_download("},{"line_number":765,"context_line":"                    context,"},{"line_number":766,"context_line":"                    volume_ref,"},{"line_number":767,"context_line":"                    image_location,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_6863c3b1","line":764,"updated":"2016-06-30 14:00:57.000000000","message":"I think this will fetch the image twice if should_create_cache_entry is true.\n\nAlso, I don\u0027t think currently the image will be fetched twice if should_create_cache_entry is false. See the default implementation of copy_image_to_volume in driver.py. The fetch_to_raw in image_utils uses the image pre-fetched by TemporaryImages.","commit_id":"af8593439f0b2a602d993285be07fe0ccdd8202c"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"57ad51149a2c500ebe7d81a60beeb8812a3243be","unresolved":false,"context_lines":[{"line_number":761,"context_line":"                            volume_ref.size \u003d virtual_size"},{"line_number":762,"context_line":"                            volume_ref.save()"},{"line_number":763,"context_line":""},{"line_number":764,"context_line":"                model_update \u003d self._create_from_image_download("},{"line_number":765,"context_line":"                    context,"},{"line_number":766,"context_line":"                    volume_ref,"},{"line_number":767,"context_line":"                    image_location,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_d73b39e8","line":764,"in_reply_to":"3aaa91ec_1e62193e","updated":"2016-07-13 17:16:26.000000000","message":"Ok agreed, but line 764 is now outside the TemporaryImages.fetch context. So if should_create_cache_entry is true, the image is prefetched, then deleted and again fetched when the function in line 764 is called.","commit_id":"af8593439f0b2a602d993285be07fe0ccdd8202c"},{"author":{"_account_id":12732,"name":"Bin Zhou","email":"zhou.bin9@zte.com.cn","username":"BinZhou"},"change_message_id":"ee858240ab5dc7c0b0a4c6acc2b9d66316dcf5c4","unresolved":false,"context_lines":[{"line_number":761,"context_line":"                            volume_ref.size \u003d virtual_size"},{"line_number":762,"context_line":"                            volume_ref.save()"},{"line_number":763,"context_line":""},{"line_number":764,"context_line":"                model_update \u003d self._create_from_image_download("},{"line_number":765,"context_line":"                    context,"},{"line_number":766,"context_line":"                    volume_ref,"},{"line_number":767,"context_line":"                    image_location,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_1e62193e","line":764,"in_reply_to":"3aaa91ec_6863c3b1","updated":"2016-07-01 01:26:12.000000000","message":"Yes, but I don\u0027t think it\u0027s reasonable to pre-fetch image if should_create_cache_entry is false, considering the image-fetching may consume to much time, it\u0027s more comprehensible to fetch image when the work-flow really needed to use it,so postponing image fetch in function fetch_to_raw if should_create_cache_entry is false would be better, your opinion ?","commit_id":"af8593439f0b2a602d993285be07fe0ccdd8202c"}]}
