)]}'
{"cinder/volume/api.py":[{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"e58ffe4abc0be9f5ee54a40ab318c7b48ccabf7f","unresolved":false,"context_lines":[{"line_number":352,"context_line":"        # Volume cannot have snapshots if we want to delete it"},{"line_number":353,"context_line":"        filters \u003d [~db.volume_has_snapshots_filter()]"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"        while True:"},{"line_number":356,"context_line":"            # Atomic status update"},{"line_number":357,"context_line":"            now \u003d timeutils.utcnow()"},{"line_number":358,"context_line":"            updated \u003d vol_obj.conditional_update("}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_21c7ea65","line":355,"updated":"2015-08-07 18:13:18.000000000","message":"If two c-vols enters this loop in the same time, one wins the conditional_update, the other one will loop forever.","commit_id":"1b9b20a211f89fd0f577565724f91415144e6450"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"e58ffe4abc0be9f5ee54a40ab318c7b48ccabf7f","unresolved":false,"context_lines":[{"line_number":368,"context_line":"                break"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"            # Get updated volume"},{"line_number":371,"context_line":"            vol_obj \u003d volume \u003d objects.Volume.get_by_id(context, volume_id)"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"            if volume[\u0027attach_status\u0027] \u003d\u003d \"attached\":"},{"line_number":374,"context_line":"                # Volume is still attached, need to detach first"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_4116b6f2","line":371,"updated":"2015-08-07 18:13:18.000000000","message":"I think you have over-indented here. The deleting logic should be out of `while True` loop body.","commit_id":"1b9b20a211f89fd0f577565724f91415144e6450"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"3347313f30f27112d73646bd53bec9bd0fc75cc0","unresolved":false,"context_lines":[{"line_number":368,"context_line":"                break"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"            # Get updated volume"},{"line_number":371,"context_line":"            vol_obj \u003d volume \u003d objects.Volume.get_by_id(context, volume_id)"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"            if volume[\u0027attach_status\u0027] \u003d\u003d \"attached\":"},{"line_number":374,"context_line":"                # Volume is still attached, need to detach first"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_b78eaf77","line":371,"in_reply_to":"1a4dcd0f_4116b6f2","updated":"2015-08-14 11:47:34.000000000","message":"I didn\u0027t over indent.  This is here on purpose, so that we don\u0027t loop forever like you said in your previous comment.","commit_id":"1b9b20a211f89fd0f577565724f91415144e6450"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"df0c7bb9dbe90a0cef94e61d5c32091a0480cab4","unresolved":false,"context_lines":[{"line_number":368,"context_line":"                break"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"            # Get updated volume"},{"line_number":371,"context_line":"            vol_obj \u003d volume \u003d objects.Volume.get_by_id(context, volume_id)"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"            if volume[\u0027attach_status\u0027] \u003d\u003d \"attached\":"},{"line_number":374,"context_line":"                # Volume is still attached, need to detach first"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_263b143a","line":371,"in_reply_to":"1a4dcd0f_b78eaf77","updated":"2015-08-25 10:38:50.000000000","message":"Got your point. The second c-vols, who failed conditional update, will check errors and return by raising exception. Thanks for your explanation!","commit_id":"1b9b20a211f89fd0f577565724f91415144e6450"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"f55f546e016f4ad2ce6bac40e2108ba2d00bde73","unresolved":false,"context_lines":[{"line_number":404,"context_line":"        # Loop until we make a decission on whether to go forward with the"},{"line_number":405,"context_line":"        # deletion or raise and error"},{"line_number":406,"context_line":"        # TODO(geguileo): Once we are using versioned objects we should change"},{"line_number":407,"context_line":"        # this to use volume.conditiona_update"},{"line_number":408,"context_line":"        while not db.conditional_update(context, objects.Volume.ORM_MODEL,"},{"line_number":409,"context_line":"                                        {\u0027status\u0027: \u0027deleting\u0027,"},{"line_number":410,"context_line":"                                         \u0027terminated_at\u0027: timeutils.utcnow()},"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_e1b42636","line":407,"updated":"2015-08-25 11:28:46.000000000","message":"conditiona_update \u003d\u003e conditional_update","commit_id":"2359489d6484d0294aeeccfca89d6b47e8f53dd8"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"ca8e7a0162c3dab355e0d8abf566075ad9c6d54a","unresolved":false,"context_lines":[{"line_number":404,"context_line":"        # Loop until we make a decission on whether to go forward with the"},{"line_number":405,"context_line":"        # deletion or raise and error"},{"line_number":406,"context_line":"        # TODO(geguileo): Once we are using versioned objects we should change"},{"line_number":407,"context_line":"        # this to use volume.conditiona_update"},{"line_number":408,"context_line":"        while not db.conditional_update(context, objects.Volume.ORM_MODEL,"},{"line_number":409,"context_line":"                                        {\u0027status\u0027: \u0027deleting\u0027,"},{"line_number":410,"context_line":"                                         \u0027terminated_at\u0027: timeutils.utcnow()},"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_a7b95b30","line":407,"in_reply_to":"fa1b9901_e1b42636","updated":"2015-08-25 12:46:36.000000000","message":"Done in my local branch, will update on next rebase or patch change.","commit_id":"2359489d6484d0294aeeccfca89d6b47e8f53dd8"},{"author":{"_account_id":13900,"name":"Accela Zhao","email":"accelazh@gmail.com","username":"accelazh"},"change_message_id":"f55f546e016f4ad2ce6bac40e2108ba2d00bde73","unresolved":false,"context_lines":[{"line_number":587,"context_line":"            # TODO(geguileo): Once Volume Versioned Object has multiattach"},{"line_number":588,"context_line":"            # field change this to use objects.Volume.get_by_id and change"},{"line_number":589,"context_line":"            # accessing from dict to attribute"},{"line_number":590,"context_line":"            volume \u003d db.volume_get(context, volume[\u0027id\u0027])"},{"line_number":591,"context_line":"            if volume[\u0027status\u0027] \u003d\u003d \u0027in-use\u0027 and not volume[\u0027multiattach\u0027]:"},{"line_number":592,"context_line":"                msg \u003d _(\"Volume must be multiattachable to reserve again.\")"},{"line_number":593,"context_line":"                LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_41e8727c","line":590,"updated":"2015-08-25 11:28:46.000000000","message":"Would you like to provide a _raise_reserve_error like the _raise_delete_error here?\n\nP.S. you really changed a lot from patch 1 to patch 3.","commit_id":"2359489d6484d0294aeeccfca89d6b47e8f53dd8"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"ca8e7a0162c3dab355e0d8abf566075ad9c6d54a","unresolved":false,"context_lines":[{"line_number":587,"context_line":"            # TODO(geguileo): Once Volume Versioned Object has multiattach"},{"line_number":588,"context_line":"            # field change this to use objects.Volume.get_by_id and change"},{"line_number":589,"context_line":"            # accessing from dict to attribute"},{"line_number":590,"context_line":"            volume \u003d db.volume_get(context, volume[\u0027id\u0027])"},{"line_number":591,"context_line":"            if volume[\u0027status\u0027] \u003d\u003d \u0027in-use\u0027 and not volume[\u0027multiattach\u0027]:"},{"line_number":592,"context_line":"                msg \u003d _(\"Volume must be multiattachable to reserve again.\")"},{"line_number":593,"context_line":"                LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_27578b03","line":590,"in_reply_to":"fa1b9901_41e8727c","updated":"2015-08-25 12:46:36.000000000","message":"No, I will only be extracting that logic to an external method when the method is too long, as is the case of delete.  Here this only adds 13 LOC.","commit_id":"2359489d6484d0294aeeccfca89d6b47e8f53dd8"},{"author":{"_account_id":16883,"name":"huyang","email":"huyang1@huawei.com","username":"huyang"},"change_message_id":"5c594b9c2ad7c514d37351e9edbefd93aea10577","unresolved":false,"context_lines":[{"line_number":325,"context_line":"            # Volume is migrating, wait until done"},{"line_number":326,"context_line":"            LOG.info(_LI(\u0027Unable to delete volume: %s, \u0027"},{"line_number":327,"context_line":"                         \u0027volume is currently migrating.\u0027), volume[\u0027id\u0027])"},{"line_number":328,"context_line":"            msg \u003d _(\"Volume cannot be deleted while migrating\")"},{"line_number":329,"context_line":"            raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"        if volume.attach_status \u003d\u003d \"attached\":"}],"source_content_type":"text/x-python","patch_set":11,"id":"da20952f_4bc84155","line":328,"updated":"2015-09-06 01:54:18.000000000","message":"Missing . at EOL. Keep consistent with other msg.","commit_id":"338f186d9f40ace2c28f0d04bc4c78a3dc673bc2"},{"author":{"_account_id":16883,"name":"huyang","email":"huyang1@huawei.com","username":"huyang"},"change_message_id":"5c594b9c2ad7c514d37351e9edbefd93aea10577","unresolved":false,"context_lines":[{"line_number":348,"context_line":"            # Volume is migrating, wait until done"},{"line_number":349,"context_line":"            LOG.info(_LI(\u0027Unable to delete volume: %s, \u0027"},{"line_number":350,"context_line":"                         \u0027volume is currently migrating.\u0027), volume.id)"},{"line_number":351,"context_line":"            msg \u003d _(\"Volume cannot be deleted while migrating\")"},{"line_number":352,"context_line":"            raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        if volume.consistencygroup_id is not None:"}],"source_content_type":"text/x-python","patch_set":11,"id":"da20952f_0bbec9ad","line":351,"updated":"2015-09-06 01:54:18.000000000","message":"Missing . at EOL. Keep consistent with other msg.","commit_id":"338f186d9f40ace2c28f0d04bc4c78a3dc673bc2"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"ee4dd500732cd37c9a02e41d2ba6b947a4ec07e2","unresolved":false,"context_lines":[{"line_number":423,"context_line":"            good_status \u003d None"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"        # Volume cannot have snapshots if we want to delete it"},{"line_number":426,"context_line":"        filters \u003d [~db.volume_has_snapshots_filter()]"},{"line_number":427,"context_line":""},{"line_number":428,"context_line":"        # Loop until we make a decission on whether to go forward with the"},{"line_number":429,"context_line":"        # deletion or raise and error"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a1a9d01_e1f8ac4b","line":426,"updated":"2015-09-28 16:30:21.000000000","message":"Another filter to add here is to make sure there aren\u0027t other volume create actions being taken where this volume is the source.","commit_id":"5896882a0c51b22ba70d39f72892c252b8181019"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"c2d02fc9a43e9c45546f213b1b1361f62800ed29","unresolved":false,"context_lines":[{"line_number":423,"context_line":"            good_status \u003d None"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"        # Volume cannot have snapshots if we want to delete it"},{"line_number":426,"context_line":"        filters \u003d [~db.volume_has_snapshots_filter()]"},{"line_number":427,"context_line":""},{"line_number":428,"context_line":"        # Loop until we make a decission on whether to go forward with the"},{"line_number":429,"context_line":"        # deletion or raise and error"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a1a9d01_4f30039f","line":426,"in_reply_to":"9a1a9d01_e1f8ac4b","updated":"2015-10-01 17:51:58.000000000","message":"Yes, we should do that, but right now with these patches we try to have the exact same behavior.  Will do that on another patch.","commit_id":"5896882a0c51b22ba70d39f72892c252b8181019"}]}
