)]}'
{"manila/share/manager.py":[{"author":{"_account_id":13998,"name":"Daniel Gonzalez Nothnagel","email":"daniel.gonzalez.nothnagel@sap.com","username":"dgonzalez"},"change_message_id":"247759a64d96128fd0e3ae3fcdb2c4b5a5761529","unresolved":false,"context_lines":[{"line_number":138,"context_line":"    return wrapped"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"def locked_snapshot_operation(operation):"},{"line_number":142,"context_line":"    \"\"\"Lock decorator for snapshot related operation."},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    Takes a named lock prior to executing the operation. The lock is named"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_e1f942ca","line":141,"updated":"2016-03-07 17:00:10.000000000","message":"If I see this correctly, we do have three \"locked_X_operation\" functions here, which, besides a single parameter, all seem to have the same content.\n\nI think it would be a good idea to create a private function which contains the common code of these three functions and let the \"locked_X_operation\" functions use this private function. The would help to reduce code duplication.","commit_id":"aee7242ab0362bf527a089cb4ce1d56e60acbd8a"},{"author":{"_account_id":9285,"name":"Madhu Mohan","email":"mmnelemane@suse.com","username":"snmohan83"},"change_message_id":"e513d17e9f290ffd0cc04ef6195f6c530f462c60","unresolved":false,"context_lines":[{"line_number":138,"context_line":"    return wrapped"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"def locked_snapshot_operation(operation):"},{"line_number":142,"context_line":"    \"\"\"Lock decorator for snapshot related operation."},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    Takes a named lock prior to executing the operation. The lock is named"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_aa8c0b80","line":141,"in_reply_to":"5aef4532_e1f942ca","updated":"2016-03-08 10:33:16.000000000","message":"That is a good idea. But here we are passing different arguments to @utils.synchronized based on the set of operations its trying to synchronize. It may be possible to use a single decorator function and pass an argument to decorator to identify the operation but the function will have multiple conditional statements to identify the correct parameter to pass to @utils.synchronized. This IMO may not be very clean.","commit_id":"aee7242ab0362bf527a089cb4ce1d56e60acbd8a"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"c4f358faa78d7034f9260b4e176541a2b2e5f88f","unresolved":false,"context_lines":[{"line_number":142,"context_line":"    \"\"\"Lock decorator for snapshot related operation."},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    Takes a named lock prior to executing the operation. The lock is named"},{"line_number":145,"context_line":"    with the id of the snapshot that is deleted."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    Intended use:"},{"line_number":148,"context_line":"    If a snapshot delete operation uses this decorator, it will block actions"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_99cef881","line":145,"range":{"start_line":145,"start_character":32,"end_line":145,"end_character":47},"updated":"2016-03-07 16:53:11.000000000","message":"?","commit_id":"aee7242ab0362bf527a089cb4ce1d56e60acbd8a"},{"author":{"_account_id":9285,"name":"Madhu Mohan","email":"mmnelemane@suse.com","username":"snmohan83"},"change_message_id":"e513d17e9f290ffd0cc04ef6195f6c530f462c60","unresolved":false,"context_lines":[{"line_number":142,"context_line":"    \"\"\"Lock decorator for snapshot related operation."},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    Takes a named lock prior to executing the operation. The lock is named"},{"line_number":145,"context_line":"    with the id of the snapshot that is deleted."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    Intended use:"},{"line_number":148,"context_line":"    If a snapshot delete operation uses this decorator, it will block actions"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_0491dcf0","line":145,"range":{"start_line":145,"start_character":32,"end_line":145,"end_character":47},"in_reply_to":"5aef4532_99cef881","updated":"2016-03-08 10:33:16.000000000","message":"Done","commit_id":"aee7242ab0362bf527a089cb4ce1d56e60acbd8a"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"c4f358faa78d7034f9260b4e176541a2b2e5f88f","unresolved":false,"context_lines":[{"line_number":145,"context_line":"    with the id of the snapshot that is deleted."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    Intended use:"},{"line_number":148,"context_line":"    If a snapshot delete operation uses this decorator, it will block actions"},{"line_number":149,"context_line":"    on all snapshots until the named lock is free. This is used to protect"},{"line_number":150,"context_line":"    concurrent operations on snapshots of the same share e.g."},{"line_number":151,"context_line":"    delete SnapshotA while creating a share instance on the snapshot."}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_f9a57cb5","line":148,"range":{"start_line":148,"start_character":18,"end_line":148,"end_character":24},"updated":"2016-03-07 16:53:11.000000000","message":"Is this only meant for delete ops?","commit_id":"aee7242ab0362bf527a089cb4ce1d56e60acbd8a"},{"author":{"_account_id":9285,"name":"Madhu Mohan","email":"mmnelemane@suse.com","username":"snmohan83"},"change_message_id":"e513d17e9f290ffd0cc04ef6195f6c530f462c60","unresolved":false,"context_lines":[{"line_number":145,"context_line":"    with the id of the snapshot that is deleted."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    Intended use:"},{"line_number":148,"context_line":"    If a snapshot delete operation uses this decorator, it will block actions"},{"line_number":149,"context_line":"    on all snapshots until the named lock is free. This is used to protect"},{"line_number":150,"context_line":"    concurrent operations on snapshots of the same share e.g."},{"line_number":151,"context_line":"    delete SnapshotA while creating a share instance on the snapshot."}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_44c124e4","line":148,"range":{"start_line":148,"start_character":18,"end_line":148,"end_character":24},"in_reply_to":"5aef4532_f9a57cb5","updated":"2016-03-08 10:33:16.000000000","message":"Done","commit_id":"aee7242ab0362bf527a089cb4ce1d56e60acbd8a"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"c4f358faa78d7034f9260b4e176541a2b2e5f88f","unresolved":false,"context_lines":[{"line_number":148,"context_line":"    If a snapshot delete operation uses this decorator, it will block actions"},{"line_number":149,"context_line":"    on all snapshots until the named lock is free. This is used to protect"},{"line_number":150,"context_line":"    concurrent operations on snapshots of the same share e.g."},{"line_number":151,"context_line":"    delete SnapshotA while creating a share instance on the snapshot."},{"line_number":152,"context_line":"    \"\"\""},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def wrapped(instance, context, snapshot_id, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_d976c03d","line":151,"range":{"start_line":151,"start_character":38,"end_line":151,"end_character":52},"updated":"2016-03-07 16:53:11.000000000","message":"s/share instance/share","commit_id":"aee7242ab0362bf527a089cb4ce1d56e60acbd8a"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"c4f358faa78d7034f9260b4e176541a2b2e5f88f","unresolved":false,"context_lines":[{"line_number":148,"context_line":"    If a snapshot delete operation uses this decorator, it will block actions"},{"line_number":149,"context_line":"    on all snapshots until the named lock is free. This is used to protect"},{"line_number":150,"context_line":"    concurrent operations on snapshots of the same share e.g."},{"line_number":151,"context_line":"    delete SnapshotA while creating a share instance on the snapshot."},{"line_number":152,"context_line":"    \"\"\""},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def wrapped(instance, context, snapshot_id, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_19882822","line":151,"range":{"start_line":151,"start_character":53,"end_line":151,"end_character":55},"updated":"2016-03-07 16:53:11.000000000","message":"with the snapshot?","commit_id":"aee7242ab0362bf527a089cb4ce1d56e60acbd8a"},{"author":{"_account_id":9285,"name":"Madhu Mohan","email":"mmnelemane@suse.com","username":"snmohan83"},"change_message_id":"e513d17e9f290ffd0cc04ef6195f6c530f462c60","unresolved":false,"context_lines":[{"line_number":148,"context_line":"    If a snapshot delete operation uses this decorator, it will block actions"},{"line_number":149,"context_line":"    on all snapshots until the named lock is free. This is used to protect"},{"line_number":150,"context_line":"    concurrent operations on snapshots of the same share e.g."},{"line_number":151,"context_line":"    delete SnapshotA while creating a share instance on the snapshot."},{"line_number":152,"context_line":"    \"\"\""},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def wrapped(instance, context, snapshot_id, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_e4b0308e","line":151,"range":{"start_line":151,"start_character":53,"end_line":151,"end_character":55},"in_reply_to":"5aef4532_19882822","updated":"2016-03-08 10:33:16.000000000","message":"Done","commit_id":"aee7242ab0362bf527a089cb4ce1d56e60acbd8a"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"c4f358faa78d7034f9260b4e176541a2b2e5f88f","unresolved":false,"context_lines":[{"line_number":164,"context_line":"    \"\"\"Lock decorator for share-instance related operations."},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    Takes a named lock prior to executing the operation. The lock is named"},{"line_number":167,"context_line":"    with the id of the share instance that is deleted."},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    Intended use:"},{"line_number":170,"context_line":"    If a share-instance  delete operation uses this decorator, it will block"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_595ab084","line":167,"range":{"start_line":167,"start_character":46,"end_line":167,"end_character":53},"updated":"2016-03-07 16:53:11.000000000","message":"?","commit_id":"aee7242ab0362bf527a089cb4ce1d56e60acbd8a"},{"author":{"_account_id":9285,"name":"Madhu Mohan","email":"mmnelemane@suse.com","username":"snmohan83"},"change_message_id":"e513d17e9f290ffd0cc04ef6195f6c530f462c60","unresolved":false,"context_lines":[{"line_number":164,"context_line":"    \"\"\"Lock decorator for share-instance related operations."},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    Takes a named lock prior to executing the operation. The lock is named"},{"line_number":167,"context_line":"    with the id of the share instance that is deleted."},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    Intended use:"},{"line_number":170,"context_line":"    If a share-instance  delete operation uses this decorator, it will block"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_24e698b4","line":167,"range":{"start_line":167,"start_character":46,"end_line":167,"end_character":53},"in_reply_to":"5aef4532_595ab084","updated":"2016-03-08 10:33:16.000000000","message":"Done","commit_id":"aee7242ab0362bf527a089cb4ce1d56e60acbd8a"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"c4f358faa78d7034f9260b4e176541a2b2e5f88f","unresolved":false,"context_lines":[{"line_number":167,"context_line":"    with the id of the share instance that is deleted."},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    Intended use:"},{"line_number":170,"context_line":"    If a share-instance  delete operation uses this decorator, it will block"},{"line_number":171,"context_line":"    actions on all share-instances until the named lock is free. This is used"},{"line_number":172,"context_line":"    to protect concurrent operations on share instances e.g.: Creating a"},{"line_number":173,"context_line":"    snapshot on the share instance, changing access permissions or perform"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_99543855","line":170,"range":{"start_line":170,"start_character":25,"end_line":170,"end_character":31},"updated":"2016-03-07 16:53:11.000000000","message":"only delete operations?","commit_id":"aee7242ab0362bf527a089cb4ce1d56e60acbd8a"},{"author":{"_account_id":9285,"name":"Madhu Mohan","email":"mmnelemane@suse.com","username":"snmohan83"},"change_message_id":"e513d17e9f290ffd0cc04ef6195f6c530f462c60","unresolved":false,"context_lines":[{"line_number":167,"context_line":"    with the id of the share instance that is deleted."},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    Intended use:"},{"line_number":170,"context_line":"    If a share-instance  delete operation uses this decorator, it will block"},{"line_number":171,"context_line":"    actions on all share-instances until the named lock is free. This is used"},{"line_number":172,"context_line":"    to protect concurrent operations on share instances e.g.: Creating a"},{"line_number":173,"context_line":"    snapshot on the share instance, changing access permissions or perform"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_84d68cc3","line":170,"range":{"start_line":170,"start_character":25,"end_line":170,"end_character":31},"in_reply_to":"5aef4532_99543855","updated":"2016-03-08 10:33:16.000000000","message":"Done","commit_id":"aee7242ab0362bf527a089cb4ce1d56e60acbd8a"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"c4f358faa78d7034f9260b4e176541a2b2e5f88f","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    Intended use:"},{"line_number":170,"context_line":"    If a share-instance  delete operation uses this decorator, it will block"},{"line_number":171,"context_line":"    actions on all share-instances until the named lock is free. This is used"},{"line_number":172,"context_line":"    to protect concurrent operations on share instances e.g.: Creating a"},{"line_number":173,"context_line":"    snapshot on the share instance, changing access permissions or perform"},{"line_number":174,"context_line":"    migrations while the share instance is being deleted."}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_19c78813","line":171,"range":{"start_line":171,"start_character":19,"end_line":171,"end_character":34},"updated":"2016-03-07 16:53:11.000000000","message":"all share-instances?","commit_id":"aee7242ab0362bf527a089cb4ce1d56e60acbd8a"},{"author":{"_account_id":9285,"name":"Madhu Mohan","email":"mmnelemane@suse.com","username":"snmohan83"},"change_message_id":"e513d17e9f290ffd0cc04ef6195f6c530f462c60","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    Intended use:"},{"line_number":170,"context_line":"    If a share-instance  delete operation uses this decorator, it will block"},{"line_number":171,"context_line":"    actions on all share-instances until the named lock is free. This is used"},{"line_number":172,"context_line":"    to protect concurrent operations on share instances e.g.: Creating a"},{"line_number":173,"context_line":"    snapshot on the share instance, changing access permissions or perform"},{"line_number":174,"context_line":"    migrations while the share instance is being deleted."}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_a4d108d0","line":171,"range":{"start_line":171,"start_character":19,"end_line":171,"end_character":34},"in_reply_to":"5aef4532_19c78813","updated":"2016-03-08 10:33:16.000000000","message":"Done","commit_id":"aee7242ab0362bf527a089cb4ce1d56e60acbd8a"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"c4f358faa78d7034f9260b4e176541a2b2e5f88f","unresolved":false,"context_lines":[{"line_number":170,"context_line":"    If a share-instance  delete operation uses this decorator, it will block"},{"line_number":171,"context_line":"    actions on all share-instances until the named lock is free. This is used"},{"line_number":172,"context_line":"    to protect concurrent operations on share instances e.g.: Creating a"},{"line_number":173,"context_line":"    snapshot on the share instance, changing access permissions or perform"},{"line_number":174,"context_line":"    migrations while the share instance is being deleted."},{"line_number":175,"context_line":"    \"\"\""},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_99db98ed","line":173,"range":{"start_line":173,"start_character":67,"end_line":173,"end_character":74},"updated":"2016-03-07 16:53:11.000000000","message":"performing","commit_id":"aee7242ab0362bf527a089cb4ce1d56e60acbd8a"},{"author":{"_account_id":9285,"name":"Madhu Mohan","email":"mmnelemane@suse.com","username":"snmohan83"},"change_message_id":"e513d17e9f290ffd0cc04ef6195f6c530f462c60","unresolved":false,"context_lines":[{"line_number":170,"context_line":"    If a share-instance  delete operation uses this decorator, it will block"},{"line_number":171,"context_line":"    actions on all share-instances until the named lock is free. This is used"},{"line_number":172,"context_line":"    to protect concurrent operations on share instances e.g.: Creating a"},{"line_number":173,"context_line":"    snapshot on the share instance, changing access permissions or perform"},{"line_number":174,"context_line":"    migrations while the share instance is being deleted."},{"line_number":175,"context_line":"    \"\"\""},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_a4e8e87d","line":173,"range":{"start_line":173,"start_character":67,"end_line":173,"end_character":74},"in_reply_to":"5aef4532_99db98ed","updated":"2016-03-08 10:33:16.000000000","message":"Done","commit_id":"aee7242ab0362bf527a089cb4ce1d56e60acbd8a"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"c4f358faa78d7034f9260b4e176541a2b2e5f88f","unresolved":false,"context_lines":[{"line_number":2249,"context_line":"        LOG.info(_LI(\"Shrink share completed successfully.\"), resource\u003dshare)"},{"line_number":2250,"context_line":""},{"line_number":2251,"context_line":"    @utils.require_driver_initialized"},{"line_number":2252,"context_line":"    @locked_share_instance_operation"},{"line_number":2253,"context_line":"    def create_consistency_group(self, context, cg_id):"},{"line_number":2254,"context_line":"        context \u003d context.elevated()"},{"line_number":2255,"context_line":"        group_ref \u003d self.db.consistency_group_get(context, cg_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_39b524cd","line":2252,"range":{"start_line":2252,"start_character":5,"end_line":2252,"end_character":36},"updated":"2016-03-07 16:53:11.000000000","message":"This wouldn\u0027t be helpful as a CG is for multiple share instances; and there is no share_instance_id in the parameters..","commit_id":"aee7242ab0362bf527a089cb4ce1d56e60acbd8a"},{"author":{"_account_id":9285,"name":"Madhu Mohan","email":"mmnelemane@suse.com","username":"snmohan83"},"change_message_id":"e513d17e9f290ffd0cc04ef6195f6c530f462c60","unresolved":false,"context_lines":[{"line_number":2249,"context_line":"        LOG.info(_LI(\"Shrink share completed successfully.\"), resource\u003dshare)"},{"line_number":2250,"context_line":""},{"line_number":2251,"context_line":"    @utils.require_driver_initialized"},{"line_number":2252,"context_line":"    @locked_share_instance_operation"},{"line_number":2253,"context_line":"    def create_consistency_group(self, context, cg_id):"},{"line_number":2254,"context_line":"        context \u003d context.elevated()"},{"line_number":2255,"context_line":"        group_ref \u003d self.db.consistency_group_get(context, cg_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_840e8c32","line":2252,"range":{"start_line":2252,"start_character":5,"end_line":2252,"end_character":36},"in_reply_to":"5aef4532_39b524cd","updated":"2016-03-08 10:33:16.000000000","message":"Agreed. Will remove this in the next patch.","commit_id":"aee7242ab0362bf527a089cb4ce1d56e60acbd8a"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"14400894443b19b4ed3c3a726f53b79c9970bb8b","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    promote ReplicaA while deleting ReplicaB, both belonging to the same share."},{"line_number":130,"context_line":"    \"\"\""},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def lsro_inner1(instance, context, share_replica_id, share_id\u003dNone,"},{"line_number":133,"context_line":"                    **kwargs):"},{"line_number":134,"context_line":"        @utils.synchronized(\"%s\" % share_id, external\u003dTrue)"},{"line_number":135,"context_line":"        def locked_operation(*_args, **_kwargs):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_9e7f8b65","line":132,"range":{"start_line":132,"start_character":8,"end_line":132,"end_character":12},"updated":"2016-03-09 13:36:54.000000000","message":"lsro? What does \"1\" in the end mean?","commit_id":"c19dc9c588cdae3ffac6756344a41e91d106b241"},{"author":{"_account_id":9285,"name":"Madhu Mohan","email":"mmnelemane@suse.com","username":"snmohan83"},"change_message_id":"c51ff8d2f465067b399c4ef68a444fb6fc5abb6e","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    promote ReplicaA while deleting ReplicaB, both belonging to the same share."},{"line_number":130,"context_line":"    \"\"\""},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def lsro_inner1(instance, context, share_replica_id, share_id\u003dNone,"},{"line_number":133,"context_line":"                    **kwargs):"},{"line_number":134,"context_line":"        @utils.synchronized(\"%s\" % share_id, external\u003dTrue)"},{"line_number":135,"context_line":"        def locked_operation(*_args, **_kwargs):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_baf6caf6","line":132,"range":{"start_line":132,"start_character":8,"end_line":132,"end_character":12},"in_reply_to":"5aef4532_9e7f8b65","updated":"2016-03-09 15:31:41.000000000","message":"That actually came from similar code in cinder. Can remove that in the next patch","commit_id":"c19dc9c588cdae3ffac6756344a41e91d106b241"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"14400894443b19b4ed3c3a726f53b79c9970bb8b","unresolved":false,"context_lines":[{"line_number":161,"context_line":"    return lso_inner1"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"def locked_share_instance_operation(operation):"},{"line_number":165,"context_line":"    \"\"\"Lock decorator for share-instance related operations."},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    Takes a named lock prior to executing the operation. The lock is named"},{"line_number":168,"context_line":"    with the id of the share instance."},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    Intended use:"},{"line_number":171,"context_line":"    If a share-instance operation uses this decorator, it will block"},{"line_number":172,"context_line":"    actions on this share-instance until the named lock is free. This is used"},{"line_number":173,"context_line":"    to protect concurrent operations on share instance e.g.: Creating a"},{"line_number":174,"context_line":"    snapshot on the share instance, changing access permissions or"},{"line_number":175,"context_line":"    performing migrations while the share instance is being deleted."},{"line_number":176,"context_line":"    \"\"\""},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def lsio_inner1(instance, context, share_instance_id, *args, **kwargs):"},{"line_number":179,"context_line":"        @utils.synchronized(\"%s\" % share_instance_id, external\u003dTrue)"},{"line_number":180,"context_line":"        def locked_operation(*_args, **_kwargs):"},{"line_number":181,"context_line":"            return operation(*_args, **_kwargs)"},{"line_number":182,"context_line":"        return locked_operation(instance, context, share_instance_id,"},{"line_number":183,"context_line":"                                *args, **kwargs)"},{"line_number":184,"context_line":"    return lsio_inner1"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"def add_hooks(f):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_dec3d387","line":184,"range":{"start_line":164,"start_character":0,"end_line":184,"end_character":22},"updated":"2016-03-09 13:36:54.000000000","message":"It duplicates method above completely. Single function should be enough.","commit_id":"c19dc9c588cdae3ffac6756344a41e91d106b241"},{"author":{"_account_id":9285,"name":"Madhu Mohan","email":"mmnelemane@suse.com","username":"snmohan83"},"change_message_id":"c51ff8d2f465067b399c4ef68a444fb6fc5abb6e","unresolved":false,"context_lines":[{"line_number":161,"context_line":"    return lso_inner1"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"def locked_share_instance_operation(operation):"},{"line_number":165,"context_line":"    \"\"\"Lock decorator for share-instance related operations."},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    Takes a named lock prior to executing the operation. The lock is named"},{"line_number":168,"context_line":"    with the id of the share instance."},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    Intended use:"},{"line_number":171,"context_line":"    If a share-instance operation uses this decorator, it will block"},{"line_number":172,"context_line":"    actions on this share-instance until the named lock is free. This is used"},{"line_number":173,"context_line":"    to protect concurrent operations on share instance e.g.: Creating a"},{"line_number":174,"context_line":"    snapshot on the share instance, changing access permissions or"},{"line_number":175,"context_line":"    performing migrations while the share instance is being deleted."},{"line_number":176,"context_line":"    \"\"\""},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def lsio_inner1(instance, context, share_instance_id, *args, **kwargs):"},{"line_number":179,"context_line":"        @utils.synchronized(\"%s\" % share_instance_id, external\u003dTrue)"},{"line_number":180,"context_line":"        def locked_operation(*_args, **_kwargs):"},{"line_number":181,"context_line":"            return operation(*_args, **_kwargs)"},{"line_number":182,"context_line":"        return locked_operation(instance, context, share_instance_id,"},{"line_number":183,"context_line":"                                *args, **kwargs)"},{"line_number":184,"context_line":"    return lsio_inner1"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"def add_hooks(f):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_3a68fa86","line":184,"range":{"start_line":164,"start_character":0,"end_line":184,"end_character":22},"in_reply_to":"5aef4532_dec3d387","updated":"2016-03-09 15:31:41.000000000","message":"Thanks. I think Gautham also had a similar opinion. Will change in the next patch.","commit_id":"c19dc9c588cdae3ffac6756344a41e91d106b241"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"80c57fb383ed002c8da2809bb616e0ae917b3259","unresolved":false,"context_lines":[{"line_number":155,"context_line":"    share instance."},{"line_number":156,"context_line":"    \"\"\""},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def lssio_inner(instance, context, resource_id, *args, **kwargs):"},{"line_number":159,"context_line":"        @utils.synchronized(\"%s\" % resource_id, external\u003dTrue)"},{"line_number":160,"context_line":"        def locked_operation(*_args, **_kwargs):"},{"line_number":161,"context_line":"            return operation(*_args, **_kwargs)"},{"line_number":162,"context_line":"        return locked_operation(instance, context, resource_id,"},{"line_number":163,"context_line":"                                *args, **kwargs)"},{"line_number":164,"context_line":"    return lssio_inner"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"def add_hooks(f):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1af94dfe_5bccb1ba","line":164,"range":{"start_line":158,"start_character":4,"end_line":164,"end_character":22},"updated":"2016-03-18 16:38:38.000000000","message":"this lock is broken, see:\n\nhttp://logs.openstack.org/41/289441/5/check/gate-manila-tempest-dsvm-postgres-zfsonlinux/758854a/logs/screen-m-shr.txt.gz#_2016-03-17_19_25_42_958","commit_id":"d4274f715631640cc8bfa4e6b422ceec5c9f00be"}],"manila/tests/share/test_manager.py":[{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"6e60b5e08c22214bd760c26155afad7956f508d2","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    @ddt.unpack"},{"line_number":85,"context_line":"    def test_locked_snapshot_operation(self, **resource):"},{"line_number":86,"context_line":"        self.manager.fake_snapshot_share_instance_operation(self.fake_context,"},{"line_number":87,"context_line":"                                                   resource)"},{"line_number":88,"context_line":"        self.assertTrue(self.lock_call.called)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1af94dfe_e5f46188","line":87,"range":{"start_line":87,"start_character":51,"end_line":87,"end_character":60},"updated":"2016-03-17 02:55:33.000000000","message":"Continuation line under-indented for visual indent","commit_id":"5da6adc4f4e26b561eeaa6914cb0edfd77b02d20"},{"author":{"_account_id":9285,"name":"Madhu Mohan","email":"mmnelemane@suse.com","username":"snmohan83"},"change_message_id":"337a71cb4e77ac2808f04baf5aa9dafb49967cfa","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    @ddt.unpack"},{"line_number":85,"context_line":"    def test_locked_snapshot_operation(self, **resource):"},{"line_number":86,"context_line":"        self.manager.fake_snapshot_share_instance_operation(self.fake_context,"},{"line_number":87,"context_line":"                                                   resource)"},{"line_number":88,"context_line":"        self.assertTrue(self.lock_call.called)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1af94dfe_a6387e3e","line":87,"range":{"start_line":87,"start_character":51,"end_line":87,"end_character":60},"in_reply_to":"1af94dfe_e5f46188","updated":"2016-03-17 16:11:06.000000000","message":"Done","commit_id":"5da6adc4f4e26b561eeaa6914cb0edfd77b02d20"}]}
