)]}'
{"cinder/volume/api.py":[{"author":{"_account_id":30147,"name":"ye","email":"wmxy123@yeah.net","username":"dakele"},"change_message_id":"762b5efd8cc5eeebf42b07e381b5ec35f140ffe0","unresolved":false,"context_lines":[{"line_number":497,"context_line":""},{"line_number":498,"context_line":"        result \u003d volume.conditional_update(values, expected, filters)"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"        if not result:"},{"line_number":501,"context_line":"            status \u003d utils.build_or_str(expected.get(\u0027status\u0027),"},{"line_number":502,"context_line":"                                        _(\u0027status must be %s and\u0027))"},{"line_number":503,"context_line":"            msg \u003d _(\u0027Volume %s must not be migrating, attached, belong to a \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_ac9bea63","line":500,"updated":"2019-07-30 08:25:49.000000000","message":"I wonder if its more proper to add status_check after line 500. conditional_update only returns 0/1 but we can still get the Volume-info from volume object.","commit_id":"1d57fce52386a3b30cd855522fafea3cad336e1f"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"d879ab6797d87e99eb66157a138ab8aefe2e4351","unresolved":false,"context_lines":[{"line_number":497,"context_line":""},{"line_number":498,"context_line":"        result \u003d volume.conditional_update(values, expected, filters)"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"        if not result:"},{"line_number":501,"context_line":"            status \u003d utils.build_or_str(expected.get(\u0027status\u0027),"},{"line_number":502,"context_line":"                                        _(\u0027status must be %s and\u0027))"},{"line_number":503,"context_line":"            msg \u003d _(\u0027Volume %s must not be migrating, attached, belong to a \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_0425195c","line":500,"in_reply_to":"7faddb67_ac9bea63","updated":"2019-07-31 14:42:09.000000000","message":"Doing so risks race conditions that will return incorrect/misleading info, which is not a benefit over how this works now.","commit_id":"1d57fce52386a3b30cd855522fafea3cad336e1f"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6167ec4dafc907ae9727be423226b068847fcff6","unresolved":false,"context_lines":[{"line_number":497,"context_line":""},{"line_number":498,"context_line":"        result \u003d volume.conditional_update(values, expected, filters)"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"        if not result:"},{"line_number":501,"context_line":"            status \u003d utils.build_or_str(expected.get(\u0027status\u0027),"},{"line_number":502,"context_line":"                                        _(\u0027status must be %s and\u0027))"},{"line_number":503,"context_line":"            msg \u003d _(\u0027Volume %s must not be migrating, attached, belong to a \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_249b7566","line":500,"in_reply_to":"7faddb67_ac9bea63","updated":"2019-07-31 14:47:22.000000000","message":"The problem there is that the contents we have in memory could not be up to date, so if we use it to report the error we may be reporting an incorrect cause of failure.\n\nAnd if you reload the data to get the most up to date data it may have changed since the conditional update failed, and we  may find that according to the latest state the operation would succeed, so we cannot know why the update failed.  And now that we know that it would succeed we would want to retry the operation, but what if it failed again?\n\nUnfortunately all the solutions I can think of have downsides (including increased code complexity, additional DB requests, etc.).","commit_id":"1d57fce52386a3b30cd855522fafea3cad336e1f"}]}
