)]}'
{"specs/newton/approved/glance/add-distinction-layer.rst":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"cfb97da97927137831a42d4609de8e7184270dc9","unresolved":false,"context_lines":[{"line_number":19,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Current Glance Images v2 architectures have a defect associated with risks of"},{"line_number":22,"context_line":"race conditions arising under heavy load on the system. Here is an example of"},{"line_number":23,"context_line":"the race condition:"},{"line_number":24,"context_line":"Suppose an image has properties ``{\"foo\": \"bar\", \"goo\": \"far\"}``."},{"line_number":25,"context_line":"User1 wants to change ``{\"foo\": \"baz\"}``."}],"source_content_type":"text/x-rst","patch_set":1,"id":"1aa78d24_59284933","line":22,"updated":"2016-07-07 08:49:55.000000000","message":"nit: I\u0027d replace heavy load with concurrent requests. Concurrent request might happen even on low load","commit_id":"967e8bb403c4c3d01462d01b54923e345ab00480"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"cfb97da97927137831a42d4609de8e7184270dc9","unresolved":false,"context_lines":[{"line_number":63,"context_line":"Thus the final image record will have ``{\"foo\": \"baz\", \"goo\": \"yuck\"}``"},{"line_number":64,"context_line":"as both users intend. Of course, if user2 does actually change the value"},{"line_number":65,"context_line":"of ``foo``, then user2\u0027s change will be persisted in the database, but this is"},{"line_number":66,"context_line":"expected behavior."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"Alternatives"},{"line_number":69,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1aa78d24_b9232d55","line":66,"updated":"2016-07-07 08:49:55.000000000","message":"Could you expand a bit better on how this would integrate with change\u0027s validation?\n\nFor example:\n\nSay the changes are done to the image status:\n\nUser1 deletes the image and user2 sets a location on the image. Both changes will be merged if the distinction layer doesn\u0027t take into account that setting image locations on deleted images is not allowed. Moreover, the image status would likely be changed to active too.\n\nAm I missing something?","commit_id":"967e8bb403c4c3d01462d01b54923e345ab00480"},{"author":{"_account_id":11391,"name":"Mikhail Fedosin","email":"mfedosin@redhat.com","username":"fedosinme"},"change_message_id":"0f2b52a8375d59c3c85562ec2e097bf17bb3fb3b","unresolved":false,"context_lines":[{"line_number":63,"context_line":"Thus the final image record will have ``{\"foo\": \"baz\", \"goo\": \"yuck\"}``"},{"line_number":64,"context_line":"as both users intend. Of course, if user2 does actually change the value"},{"line_number":65,"context_line":"of ``foo``, then user2\u0027s change will be persisted in the database, but this is"},{"line_number":66,"context_line":"expected behavior."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"Alternatives"},{"line_number":69,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1aa78d24_2e6250d8","line":66,"in_reply_to":"1aa78d24_3ab9ebcc","updated":"2016-07-07 10:07:24.000000000","message":"Hi Flavio! Thanks for you review.\nYeah, the example you described is doesn\u0027t even without distinction layer. So, if we try to update deleted or pending_delete image db will return ImageNotFound exception here: https://github.com/openstack/glance/blob/master/glance/db/sqlalchemy/api.py#L777\n\n\u0027Killed\u0027 also is not the best example, because images v2 can\u0027t have \u0027killed\u0027 status, it\u0027s a part of v1 api. \n\nOther cases are covered with \u0027from_state\u0027 parameter. For example: https://github.com/openstack/glance/blob/master/glance/api/v2/image_actions.py#L51\nor \nhttps://github.com/openstack/glance/blob/master/glance/api/v2/image_data.py#L113\n\nOnly one thing is possible - if you want to add location to uploading image (status is \u0027saving\u0027), but it will be fixed with this change: https://review.openstack.org/#/c/324780/","commit_id":"967e8bb403c4c3d01462d01b54923e345ab00480"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"0d492fd5f6e5b671715d3301452933bdd8d07be4","unresolved":false,"context_lines":[{"line_number":63,"context_line":"Thus the final image record will have ``{\"foo\": \"baz\", \"goo\": \"yuck\"}``"},{"line_number":64,"context_line":"as both users intend. Of course, if user2 does actually change the value"},{"line_number":65,"context_line":"of ``foo``, then user2\u0027s change will be persisted in the database, but this is"},{"line_number":66,"context_line":"expected behavior."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"Alternatives"},{"line_number":69,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1aa78d24_3ab9ebcc","line":66,"in_reply_to":"1aa78d24_b9232d55","updated":"2016-07-07 09:48:25.000000000","message":"delete -\u003e active might not be the best example but you can replace deleted w/ killed or some other state transition that is not allowed.\n\n(sorry about that, I wrote the previous message in a hurry)","commit_id":"967e8bb403c4c3d01462d01b54923e345ab00480"}]}
