)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8574,"name":"Qin Zhao","username":"zhaoqin","inactive":true},"change_message_id":"0b6e1b61708b9cd203ad4662afb34ae651d92d22","unresolved":false,"context_lines":[{"line_number":16,"context_line":"state. This lock will ensure that:"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"(a) if a create of VolA from snap/volB is in progress, any"},{"line_number":19,"context_line":"    delete requests fro snap/volB will wait until the create"},{"line_number":20,"context_line":"    is complete."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"(b) if a delete of snap/volA is in progress, any create from"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"AAAATn%2F%2BrNo%3D","line":19,"updated":"2013-11-21 18:17:27.000000000","message":"\u0027for snap/volB\u0027 ? Am I correct?","commit_id":"126613e29bda3a8e9a7c9231292ffadd14ec167d"},{"author":{"_account_id":6737,"name":"Edward Hope-Morley","email":"edward.hope-morley@canonical.com","username":"hopem"},"change_message_id":"28e8599078a55c6304e9bbf8750254403255f862","unresolved":false,"context_lines":[{"line_number":16,"context_line":"state. This lock will ensure that:"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"(a) if a create of VolA from snap/volB is in progress, any"},{"line_number":19,"context_line":"    delete requests fro snap/volB will wait until the create"},{"line_number":20,"context_line":"    is complete."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"(b) if a delete of snap/volA is in progress, any create from"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"AAAATn%2F%2Bp8M%3D","line":19,"in_reply_to":"AAAATn%2F%2BrNo%3D","updated":"2013-11-21 23:15:56.000000000","message":"Correct :)","commit_id":"126613e29bda3a8e9a7c9231292ffadd14ec167d"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"e4da46301a00c8019b10daf1717e0324e172f0dd","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    snap/volA will wait until snap/volA delete is complete."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Co-authored-by: Takashi Natsume \u003cnatsume.takashi@lab.ntt.co.jp\u003e"},{"line_number":26,"context_line":"Fixes: bug 1251334"},{"line_number":27,"context_line":"Change-Id: Ie4bc0af789ab232593f55aa2f6b34345eb9b9929"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"AAAATn%2F%2BqDI%3D","line":26,"updated":"2013-11-21 23:01:13.000000000","message":"Closes-Bug: 1251334","commit_id":"126613e29bda3a8e9a7c9231292ffadd14ec167d"},{"author":{"_account_id":6737,"name":"Edward Hope-Morley","email":"edward.hope-morley@canonical.com","username":"hopem"},"change_message_id":"28e8599078a55c6304e9bbf8750254403255f862","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    snap/volA will wait until snap/volA delete is complete."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Co-authored-by: Takashi Natsume \u003cnatsume.takashi@lab.ntt.co.jp\u003e"},{"line_number":26,"context_line":"Fixes: bug 1251334"},{"line_number":27,"context_line":"Change-Id: Ie4bc0af789ab232593f55aa2f6b34345eb9b9929"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"AAAATn%2F%2Bp8g%3D","line":26,"in_reply_to":"AAAATn%2F%2BqDI%3D","updated":"2013-11-21 23:15:56.000000000","message":"Done","commit_id":"126613e29bda3a8e9a7c9231292ffadd14ec167d"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"264d0ac33be01a85d60ace3886e5b2ffcce59db8","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    snap/volA will wait until snap/volA delete is complete."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Co-authored-by: Takashi Natsume \u003cnatsume.takashi@lab.ntt.co.jp\u003e"},{"line_number":26,"context_line":"Closes-Bug 1251334"},{"line_number":27,"context_line":"Change-Id: Ie4bc0af789ab232593f55aa2f6b34345eb9b9929"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAATn%2F%2Bpy4%3D","line":26,"updated":"2013-11-21 23:50:02.000000000","message":"Ooops, this lost its connection to the bug.  I think you need a \u0027:\u0027 after Bug.  So \u0027Closes-Bug: 1251334\u0027","commit_id":"f811490445d8111db06d42f7dba1327d63c608a6"},{"author":{"_account_id":6737,"name":"Edward Hope-Morley","email":"edward.hope-morley@canonical.com","username":"hopem"},"change_message_id":"6e7627ea8463eae4dcec54af505aa2d6df23b2ab","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    snap/volA will wait until snap/volA delete is complete."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Co-authored-by: Takashi Natsume \u003cnatsume.takashi@lab.ntt.co.jp\u003e"},{"line_number":26,"context_line":"Closes-Bug 1251334"},{"line_number":27,"context_line":"Change-Id: Ie4bc0af789ab232593f55aa2f6b34345eb9b9929"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAATn%2F%2Bpxk%3D","line":26,"in_reply_to":"AAAATn%2F%2Bpy4%3D","updated":"2013-11-21 23:56:30.000000000","message":"Doh.","commit_id":"f811490445d8111db06d42f7dba1327d63c608a6"}],"cinder/volume/manager.py":[{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"3ba832d92a160b19ba117771ade4de7a6e471804","unresolved":false,"context_lines":[{"line_number":138,"context_line":"    \u0027cinder.volume.drivers.huawei.HuaweiVolumeDriver\u0027}"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"def locked_volume_operation(f):"},{"line_number":142,"context_line":"    \"\"\"Lock decorator for volume operations."},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    If a volume operation uses this decorator, it will block until the named"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BsnM%3D","line":141,"updated":"2013-11-21 12:25:17.000000000","message":"Both locked_volume_operation() and locked_snapshot_operation() are doing the same job, and I don\u0027t see a need for two functions. Yes, we will have to come up with a name which is a general term for volume and snapshot :) but I guess it will still be better than maintaining essentially duplicate code in the long run.","commit_id":"f584db12ea1ffa2a9addb14f0c39bc64c0c27768"},{"author":{"_account_id":6737,"name":"Edward Hope-Morley","email":"edward.hope-morley@canonical.com","username":"hopem"},"change_message_id":"aa555cff3bb8ff9b84fcef1a3229d377bec0a557","unresolved":false,"context_lines":[{"line_number":138,"context_line":"    \u0027cinder.volume.drivers.huawei.HuaweiVolumeDriver\u0027}"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"def locked_volume_operation(f):"},{"line_number":142,"context_line":"    \"\"\"Lock decorator for volume operations."},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    If a volume operation uses this decorator, it will block until the named"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BsEo%3D","line":141,"in_reply_to":"AAAATn%2F%2BsV8%3D","updated":"2013-11-21 14:33:49.000000000","message":"Rushi, actually it won\u0027t be possible to combine these. I had forgotten that the argument names need to be respected i.e. the inner func arg names need to mirror those of the operation we are locking.","commit_id":"f584db12ea1ffa2a9addb14f0c39bc64c0c27768"},{"author":{"_account_id":6737,"name":"Edward Hope-Morley","email":"edward.hope-morley@canonical.com","username":"hopem"},"change_message_id":"38164b07dc66688995490924c238c90d40b74e87","unresolved":false,"context_lines":[{"line_number":138,"context_line":"    \u0027cinder.volume.drivers.huawei.HuaweiVolumeDriver\u0027}"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"def locked_volume_operation(f):"},{"line_number":142,"context_line":"    \"\"\"Lock decorator for volume operations."},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    If a volume operation uses this decorator, it will block until the named"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BsV8%3D","line":141,"in_reply_to":"AAAATn%2F%2BsnM%3D","updated":"2013-11-21 13:27:11.000000000","message":"Yeah I think i did it this way it make log reading easier but your right in that they are doing the same thing. I think i\u0027ll combine them.","commit_id":"f584db12ea1ffa2a9addb14f0c39bc64c0c27768"},{"author":{"_account_id":5538,"name":"Rushi Agrawal","email":"rushi.openstack@gmail.com","username":"rushiagr"},"change_message_id":"3ba832d92a160b19ba117771ade4de7a6e471804","unresolved":false,"context_lines":[{"line_number":304,"context_line":""},{"line_number":305,"context_line":"        if locked_action is not None:"},{"line_number":306,"context_line":"            @utils.synchronized(locked_action, external\u003dTrue)"},{"line_number":307,"context_line":"            def _run_flow_locked():"},{"line_number":308,"context_line":"                _run_flow()"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"            _run_flow_locked()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2Bslk%3D","line":307,"updated":"2013-11-21 12:25:17.000000000","message":"Will this method create additional overhead if written outside this \u0027if\u0027 structure? If it doesn\u0027t, I\u0027ll prefer it that way -- does wonders to code readability :)","commit_id":"f584db12ea1ffa2a9addb14f0c39bc64c0c27768"},{"author":{"_account_id":6737,"name":"Edward Hope-Morley","email":"edward.hope-morley@canonical.com","username":"hopem"},"change_message_id":"38164b07dc66688995490924c238c90d40b74e87","unresolved":false,"context_lines":[{"line_number":304,"context_line":""},{"line_number":305,"context_line":"        if locked_action is not None:"},{"line_number":306,"context_line":"            @utils.synchronized(locked_action, external\u003dTrue)"},{"line_number":307,"context_line":"            def _run_flow_locked():"},{"line_number":308,"context_line":"                _run_flow()"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"            _run_flow_locked()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BsWQ%3D","line":307,"in_reply_to":"AAAATn%2F%2Bslk%3D","updated":"2013-11-21 13:27:11.000000000","message":"Fair enough, i\u0027ll fix that up.","commit_id":"f584db12ea1ffa2a9addb14f0c39bc64c0c27768"},{"author":{"_account_id":4159,"name":"Cory Stone","email":"corystone@gmail.com","username":"corystone"},"change_message_id":"3ad5d04a3037b4b910f1af92497ebc117b03300b","unresolved":false,"context_lines":[{"line_number":303,"context_line":"            locked_action \u003d \"%s-%s\" % (snapshot_id, \u0027delete_snapshot\u0027)"},{"line_number":304,"context_line":"        elif source_volid is not None:"},{"line_number":305,"context_line":"            # Make sure the volume is not deleted until we are done with it."},{"line_number":306,"context_line":"            locked_action \u003d \"%s-%s\" % (volume_id, \u0027delete_volume\u0027)"},{"line_number":307,"context_line":"        else:"},{"line_number":308,"context_line":"            locked_action \u003d None"},{"line_number":309,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2Br3k%3D","line":306,"updated":"2013-11-21 15:19:51.000000000","message":"Shouldn\u0027t we be locking source_volid? Is this testable?","commit_id":"1321d158889bbe48b8294706e28246162c9b4361"},{"author":{"_account_id":6737,"name":"Edward Hope-Morley","email":"edward.hope-morley@canonical.com","username":"hopem"},"change_message_id":"1f5251098087f1b1d9dff0d9395ef435b36ce63f","unresolved":false,"context_lines":[{"line_number":303,"context_line":"            locked_action \u003d \"%s-%s\" % (snapshot_id, \u0027delete_snapshot\u0027)"},{"line_number":304,"context_line":"        elif source_volid is not None:"},{"line_number":305,"context_line":"            # Make sure the volume is not deleted until we are done with it."},{"line_number":306,"context_line":"            locked_action \u003d \"%s-%s\" % (volume_id, \u0027delete_volume\u0027)"},{"line_number":307,"context_line":"        else:"},{"line_number":308,"context_line":"            locked_action \u003d None"},{"line_number":309,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2BrxY%3D","line":306,"in_reply_to":"AAAATn%2F%2Br3k%3D","updated":"2013-11-21 15:32:09.000000000","message":"Well spotted! Obviously me test is not rigourous enough.","commit_id":"1321d158889bbe48b8294706e28246162c9b4361"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"e4da46301a00c8019b10daf1717e0324e172f0dd","unresolved":false,"context_lines":[{"line_number":148,"context_line":"    Example use:"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    If a volume operation uses this decorator, it will block until the named"},{"line_number":151,"context_line":"    lock is free. This is used to protect concurrent operations of the same"},{"line_number":152,"context_line":"    volume e.g. delete VolB while create volume VolB from VolA is in progress."},{"line_number":153,"context_line":"    \"\"\""},{"line_number":154,"context_line":"    def lvo_inner1(inst, context, volume_id, **kwargs):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2BqCc%3D","line":151,"updated":"2013-11-21 23:01:13.000000000","message":"typo: of -\u003e on","commit_id":"126613e29bda3a8e9a7c9231292ffadd14ec167d"},{"author":{"_account_id":6737,"name":"Edward Hope-Morley","email":"edward.hope-morley@canonical.com","username":"hopem"},"change_message_id":"28e8599078a55c6304e9bbf8750254403255f862","unresolved":false,"context_lines":[{"line_number":148,"context_line":"    Example use:"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    If a volume operation uses this decorator, it will block until the named"},{"line_number":151,"context_line":"    lock is free. This is used to protect concurrent operations of the same"},{"line_number":152,"context_line":"    volume e.g. delete VolB while create volume VolB from VolA is in progress."},{"line_number":153,"context_line":"    \"\"\""},{"line_number":154,"context_line":"    def lvo_inner1(inst, context, volume_id, **kwargs):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2Bp%2BE%3D","line":151,"in_reply_to":"AAAATn%2F%2BqCc%3D","updated":"2013-11-21 23:15:56.000000000","message":"Done","commit_id":"126613e29bda3a8e9a7c9231292ffadd14ec167d"},{"author":{"_account_id":8574,"name":"Qin Zhao","username":"zhaoqin","inactive":true},"change_message_id":"0b6e1b61708b9cd203ad4662afb34ae651d92d22","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    If a volume operation uses this decorator, it will block until the named"},{"line_number":151,"context_line":"    lock is free. This is used to protect concurrent operations of the same"},{"line_number":152,"context_line":"    volume e.g. delete VolB while create volume VolB from VolA is in progress."},{"line_number":153,"context_line":"    \"\"\""},{"line_number":154,"context_line":"    def lvo_inner1(inst, context, volume_id, **kwargs):"},{"line_number":155,"context_line":"        @utils.synchronized(\"%s-%s\" % (volume_id, f.__name__), external\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2BrbI%3D","line":152,"updated":"2013-11-21 18:17:27.000000000","message":"I guess you hope to say \"delete VolA while create volume VolB from VolA is in progress\". Correct?  Am I wrong?","commit_id":"126613e29bda3a8e9a7c9231292ffadd14ec167d"},{"author":{"_account_id":6737,"name":"Edward Hope-Morley","email":"edward.hope-morley@canonical.com","username":"hopem"},"change_message_id":"28e8599078a55c6304e9bbf8750254403255f862","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    If a volume operation uses this decorator, it will block until the named"},{"line_number":151,"context_line":"    lock is free. This is used to protect concurrent operations of the same"},{"line_number":152,"context_line":"    volume e.g. delete VolB while create volume VolB from VolA is in progress."},{"line_number":153,"context_line":"    \"\"\""},{"line_number":154,"context_line":"    def lvo_inner1(inst, context, volume_id, **kwargs):"},{"line_number":155,"context_line":"        @utils.synchronized(\"%s-%s\" % (volume_id, f.__name__), external\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2Bp9w%3D","line":152,"in_reply_to":"AAAATn%2F%2BrbI%3D","updated":"2013-11-21 23:15:56.000000000","message":"Spotted.","commit_id":"126613e29bda3a8e9a7c9231292ffadd14ec167d"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"e4da46301a00c8019b10daf1717e0324e172f0dd","unresolved":false,"context_lines":[{"line_number":305,"context_line":"            # Make sure the volume is not deleted until we are done with it."},{"line_number":306,"context_line":"            locked_action \u003d \"%s-%s\" % (source_volid, \u0027delete_volume\u0027)"},{"line_number":307,"context_line":"        else:"},{"line_number":308,"context_line":"            locked_action \u003d None"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"        def _run_flow():"},{"line_number":311,"context_line":"            flow.run(context.elevated())"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2BqA0%3D","line":308,"updated":"2013-11-21 23:01:13.000000000","message":"Is it safe to have locked_action set to None and then use synchronized?  It looks to me like you will just end up with a lockname of cinder- which doesn\u0027t seem appropriate.  Should you not just skip the locking if there is no snapshot_id or source_volid.  This would mean that you are just creating a new volume and don\u0027t need to worry about it being having issues with the source being deleted.","commit_id":"126613e29bda3a8e9a7c9231292ffadd14ec167d"},{"author":{"_account_id":6737,"name":"Edward Hope-Morley","email":"edward.hope-morley@canonical.com","username":"hopem"},"change_message_id":"28e8599078a55c6304e9bbf8750254403255f862","unresolved":false,"context_lines":[{"line_number":305,"context_line":"            # Make sure the volume is not deleted until we are done with it."},{"line_number":306,"context_line":"            locked_action \u003d \"%s-%s\" % (source_volid, \u0027delete_volume\u0027)"},{"line_number":307,"context_line":"        else:"},{"line_number":308,"context_line":"            locked_action \u003d None"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"        def _run_flow():"},{"line_number":311,"context_line":"            flow.run(context.elevated())"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2Bp8k%3D","line":308,"in_reply_to":"AAAATn%2F%2BqA0%3D","updated":"2013-11-21 23:15:56.000000000","message":"the locked version does not get used if locked_action is None. I originally had the locked method defined within the else: but was asked to move it out on \"readability gounds\".","commit_id":"126613e29bda3a8e9a7c9231292ffadd14ec167d"}]}
