)]}'
{"neutron/db/db_base_plugin_v2.py":[{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"e7f5da6cd4bfe46aa22ac1d8326cfd8caba20704","unresolved":false,"context_lines":[{"line_number":1402,"context_line":"                context, filters\u003dfilters).with_lockmode(\u0027update\u0027)"},{"line_number":1403,"context_line":"        if ports:"},{"line_number":1404,"context_line":"            for port in ports:"},{"line_number":1405,"context_line":"                # NOTE(armando-migliaccio): call derived plugin too"},{"line_number":1406,"context_line":"                self.delete_port(context, port[\u0027id\u0027])"},{"line_number":1407,"context_line":""},{"line_number":1408,"context_line":"    def _delete_port(self, context, id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FVPI%3D","line":1405,"updated":"2013-09-30 02:58:06.000000000","message":"This delete_port() call does call the derived plugin as well.","commit_id":"f13b3240fce3aee051f4acfc81e3f8ccfc43809f"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"dad606eee86a76c2913c7264c0e4b32aa6a7e747","unresolved":false,"context_lines":[{"line_number":1402,"context_line":"                context, filters\u003dfilters).with_lockmode(\u0027update\u0027)"},{"line_number":1403,"context_line":"        if ports:"},{"line_number":1404,"context_line":"            for port in ports:"},{"line_number":1405,"context_line":"                # NOTE(armando-migliaccio): call derived plugin too"},{"line_number":1406,"context_line":"                self.delete_port(context, port[\u0027id\u0027])"},{"line_number":1407,"context_line":""},{"line_number":1408,"context_line":"    def _delete_port(self, context, id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATH%2F%2F7LA%3D","line":1405,"in_reply_to":"AAAAS3%2F%2FU3o%3D","updated":"2013-10-08 00:03:11.000000000","message":"The comment to me is slightly confusing to me, where is the call to the derived plugin ? :)","commit_id":"f13b3240fce3aee051f4acfc81e3f8ccfc43809f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"138ac63ca2360a07bbd74f071572be4de9b44372","unresolved":false,"context_lines":[{"line_number":1402,"context_line":"                context, filters\u003dfilters).with_lockmode(\u0027update\u0027)"},{"line_number":1403,"context_line":"        if ports:"},{"line_number":1404,"context_line":"            for port in ports:"},{"line_number":1405,"context_line":"                # NOTE(armando-migliaccio): call derived plugin too"},{"line_number":1406,"context_line":"                self.delete_port(context, port[\u0027id\u0027])"},{"line_number":1407,"context_line":""},{"line_number":1408,"context_line":"    def _delete_port(self, context, id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FU3o%3D","line":1405,"in_reply_to":"AAAAS3%2F%2FVPI%3D","updated":"2013-09-30 07:05:33.000000000","message":"Are you suggesting I change the note?","commit_id":"f13b3240fce3aee051f4acfc81e3f8ccfc43809f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"e010da9ab869ec6be4996115263291fae82fa6ed","unresolved":false,"context_lines":[{"line_number":1402,"context_line":"                context, filters\u003dfilters).with_lockmode(\u0027update\u0027)"},{"line_number":1403,"context_line":"        if ports:"},{"line_number":1404,"context_line":"            for port in ports:"},{"line_number":1405,"context_line":"                # NOTE(armando-migliaccio): call derived plugin too"},{"line_number":1406,"context_line":"                self.delete_port(context, port[\u0027id\u0027])"},{"line_number":1407,"context_line":""},{"line_number":1408,"context_line":"    def _delete_port(self, context, id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATH%2F%2F27U%3D","line":1405,"in_reply_to":"AAAATH%2F%2F2%2Fg%3D","updated":"2013-10-08 21:47:29.000000000","message":"Not sure I follow, the core\u0027s implementation of the delete_port is not called outside the transaction in this block. At this point, the transaction has started and the port rows have been locked for update. There\u0027s no chance that ports are going to be pulled from under our feet.\nIf you are suggesting to move the delete_port out of the with block then you are right, but I think that a base implementation shouldn\u0027t bend itself to accommodate the needs of one (of many) derived class. It _feels_ wrong.","commit_id":"f13b3240fce3aee051f4acfc81e3f8ccfc43809f"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"1653acbd8b27c280396ab124d5bdb6f4ad07f7c2","unresolved":false,"context_lines":[{"line_number":1402,"context_line":"                context, filters\u003dfilters).with_lockmode(\u0027update\u0027)"},{"line_number":1403,"context_line":"        if ports:"},{"line_number":1404,"context_line":"            for port in ports:"},{"line_number":1405,"context_line":"                # NOTE(armando-migliaccio): call derived plugin too"},{"line_number":1406,"context_line":"                self.delete_port(context, port[\u0027id\u0027])"},{"line_number":1407,"context_line":""},{"line_number":1408,"context_line":"    def _delete_port(self, context, id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATH%2F%2F2FY%3D","line":1405,"in_reply_to":"AAAATH%2F%2F27U%3D","updated":"2013-10-09 03:11:43.000000000","message":"The with statement defining the transaction covers lines 1400 thru 1402. Unless the method is called within an enclosing transaction, doesn\u0027t the transaction end between lines 1402 and 1403? If so, that means line 1406 is outside the transaction, as is required.\n\nMany plugins make blocking remote invocations on controllers, etc.. None of these should be done within a transaction, especially one that has DB tables or rows locked. The ML2 plugin makes sure mechanism drivers have the opportunity to make these invocations outside the transaction, after it has been committed. Other plugins should do the same, but I\u0027m not sure if they do.","commit_id":"f13b3240fce3aee051f4acfc81e3f8ccfc43809f"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"d9e7a8730b0cd1c4bcff3bc4de9c532c705320e7","unresolved":false,"context_lines":[{"line_number":1402,"context_line":"                context, filters\u003dfilters).with_lockmode(\u0027update\u0027)"},{"line_number":1403,"context_line":"        if ports:"},{"line_number":1404,"context_line":"            for port in ports:"},{"line_number":1405,"context_line":"                # NOTE(armando-migliaccio): call derived plugin too"},{"line_number":1406,"context_line":"                self.delete_port(context, port[\u0027id\u0027])"},{"line_number":1407,"context_line":""},{"line_number":1408,"context_line":"    def _delete_port(self, context, id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATH%2F%2F2%2Fg%3D","line":1405,"in_reply_to":"AAAATH%2F%2F650%3D","updated":"2013-10-08 21:26:37.000000000","message":"The logic looks good to me as-is. The plugin is called outside of the transaction, as is needed by ML2. But it might be a good idea to catch and ignore PortNotFound in case something else deletes the port just after the transaction ends but before delete_port() is called. \n\nAlso, I\u0027m not sure the NOTE comments are required, especially if they are causing confusion.","commit_id":"f13b3240fce3aee051f4acfc81e3f8ccfc43809f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"f688a765bed54da5e75abdba75c713d9cce315fe","unresolved":false,"context_lines":[{"line_number":1402,"context_line":"                context, filters\u003dfilters).with_lockmode(\u0027update\u0027)"},{"line_number":1403,"context_line":"        if ports:"},{"line_number":1404,"context_line":"            for port in ports:"},{"line_number":1405,"context_line":"                # NOTE(armando-migliaccio): call derived plugin too"},{"line_number":1406,"context_line":"                self.delete_port(context, port[\u0027id\u0027])"},{"line_number":1407,"context_line":""},{"line_number":1408,"context_line":"    def _delete_port(self, context, id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATH%2F%2F650%3D","line":1405,"in_reply_to":"AAAATH%2F%2F7LA%3D","updated":"2013-10-08 01:47:08.000000000","message":"The NOTE refers to the line immediately after; the call to the derived plugin is the one pointed out on the previous comment.","commit_id":"f13b3240fce3aee051f4acfc81e3f8ccfc43809f"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"1653acbd8b27c280396ab124d5bdb6f4ad07f7c2","unresolved":false,"context_lines":[{"line_number":1403,"context_line":"        if ports:"},{"line_number":1404,"context_line":"            for port in ports:"},{"line_number":1405,"context_line":"                # NOTE(armando-migliaccio): call derived plugin too"},{"line_number":1406,"context_line":"                self.delete_port(context, port[\u0027id\u0027])"},{"line_number":1407,"context_line":""},{"line_number":1408,"context_line":"    def _delete_port(self, context, id):"},{"line_number":1409,"context_line":"        port \u003d self._get_port(context, id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATH%2F%2F2FI%3D","line":1406,"updated":"2013-10-09 03:11:43.000000000","message":"If you agree this is executed outside the transaction, don\u0027t you agree PortNotFound should be caught and ignored?","commit_id":"f13b3240fce3aee051f4acfc81e3f8ccfc43809f"}]}
