)]}'
{"nova/compute/flavors.py":[{"author":{"_account_id":9142,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@lsd.ufcg.edu.br","username":"samuel-z","inactive":true},"change_message_id":"1b4dbd0c8ec84c19d28e4d4027494f4cbc7d3d1d","unresolved":false,"context_lines":[{"line_number":202,"context_line":"                    raise ValueError()"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"            except ValueError:"},{"line_number":205,"context_line":"                raise exception.InvalidInput(reason\u003d_(\"Failed. Instance using  flavor\"))"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        flavor.destroy()"},{"line_number":208,"context_line":"    except (ValueError, exception.NotFound):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_4ee18729","line":205,"updated":"2015-05-29 12:18:43.000000000","message":"In a cloud deployment where there are thousands of instances, this code will be pretty inefficient.\n\nWhat about BD FK constraints ensuring the flavor id in the instance exists in the flavor table ?\n\nI am not familiar with nova code, but there is certainly a better way to do this check.","commit_id":"a40a3acaeedeb8126d8dd80e5cd3daf9e32207ba"}]}
