)]}'
{"nova/compute/api.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d115605ab73e4f3d42fe18f8eb2bd040108bbb84","unresolved":false,"context_lines":[{"line_number":3499,"context_line":"        self._record_action_start(context, instance,"},{"line_number":3500,"context_line":"                                  instance_actions.UNLOCK)"},{"line_number":3501,"context_line":""},{"line_number":3502,"context_line":"        @wrap_instance_event(prefix\u003d\u0027api\u0027)"},{"line_number":3503,"context_line":"        def unlock(self, context, instance):"},{"line_number":3504,"context_line":"            LOG.debug(\u0027Unlocking\u0027, instance\u003dinstance)"},{"line_number":3505,"context_line":"            instance.locked \u003d False"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff82abbf_0424f2ad","line":3502,"updated":"2017-11-28 13:41:12.000000000","message":"Can we just move this decorator to the outer unlock function at L3496?","commit_id":"fbea32184142cd6236ada60db59949795ca95d8c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dd66c2161b887f83ab79b2ed9e76c01dc8dc550d","unresolved":false,"context_lines":[{"line_number":3499,"context_line":"        self._record_action_start(context, instance,"},{"line_number":3500,"context_line":"                                  instance_actions.UNLOCK)"},{"line_number":3501,"context_line":""},{"line_number":3502,"context_line":"        @wrap_instance_event(prefix\u003d\u0027api\u0027)"},{"line_number":3503,"context_line":"        def unlock(self, context, instance):"},{"line_number":3504,"context_line":"            LOG.debug(\u0027Unlocking\u0027, instance\u003dinstance)"},{"line_number":3505,"context_line":"            instance.locked \u003d False"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff82abbf_b1fb07bf","line":3502,"in_reply_to":"ff82abbf_0424f2ad","updated":"2017-11-28 15:03:04.000000000","message":"No, because the way this decorator works, it looks up the instance action by the request_id for the given instance, and the request_id is on the context. So we have to create the instance action record first, which is what _record_action_start does, and then wrap_instance_event adds the instance action event start/finish events to that action.\n\nIt makes all of this a bit ugly, I know, but that\u0027s how it works.","commit_id":"fbea32184142cd6236ada60db59949795ca95d8c"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1985e0c0fa4229b41d6601994016330d9833ba22","unresolved":false,"context_lines":[{"line_number":3499,"context_line":"        self._record_action_start(context, instance,"},{"line_number":3500,"context_line":"                                  instance_actions.UNLOCK)"},{"line_number":3501,"context_line":""},{"line_number":3502,"context_line":"        @wrap_instance_event(prefix\u003d\u0027api\u0027)"},{"line_number":3503,"context_line":"        def unlock(self, context, instance):"},{"line_number":3504,"context_line":"            LOG.debug(\u0027Unlocking\u0027, instance\u003dinstance)"},{"line_number":3505,"context_line":"            instance.locked \u003d False"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff82abbf_f1b42ff4","line":3502,"in_reply_to":"ff82abbf_b1fb07bf","updated":"2017-11-28 15:05:41.000000000","message":"Thanks for the explanation. It is clear now.","commit_id":"fbea32184142cd6236ada60db59949795ca95d8c"}]}
