)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"59997c1121463db35a421c0cf97be4c03b227cb9","unresolved":false,"context_lines":[{"line_number":15,"context_line":"deadlock at that end."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"The revision service plugin already provides us with protection from"},{"line_number":18,"context_line":"concurrent updates within a transcation via a compare and swap on the"},{"line_number":19,"context_line":"revision number that will manifest as a staledataerror in races. This"},{"line_number":20,"context_line":"error can then be retried by the retry decorator in the same way a"},{"line_number":21,"context_line":"deadlock on multi-writer would."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a3905b3_c631b1a3","line":18,"range":{"start_line":18,"start_character":28,"end_line":18,"end_character":39},"updated":"2017-01-24 16:44:20.000000000","message":"transaction","commit_id":"072358e510ebe0c1e654db90c541a707fc2a6e63"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b4b7fa3edec91835922f705f829a157c7d274c0f","unresolved":false,"context_lines":[{"line_number":15,"context_line":"deadlock at that end."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"The revision service plugin already provides us with protection from"},{"line_number":18,"context_line":"concurrent updates within a transcation via a compare and swap on the"},{"line_number":19,"context_line":"revision number that will manifest as a staledataerror in races. This"},{"line_number":20,"context_line":"error can then be retried by the retry decorator in the same way a"},{"line_number":21,"context_line":"deadlock on multi-writer would."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a3905b3_1b577dcb","line":18,"range":{"start_line":18,"start_character":28,"end_line":18,"end_character":39},"in_reply_to":"5a3905b3_c631b1a3","updated":"2017-01-24 23:03:53.000000000","message":"Done","commit_id":"072358e510ebe0c1e654db90c541a707fc2a6e63"}],"neutron/plugins/ml2/db.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"59997c1121463db35a421c0cf97be4c03b227cb9","unresolved":false,"context_lines":[{"line_number":52,"context_line":"@removals.remove("},{"line_number":53,"context_line":"    message\u003d\"Use get_port from inside of a transaction. The revision plugin \""},{"line_number":54,"context_line":"            \"provides protection against concurrent updates to the same \""},{"line_number":55,"context_line":"            \"resource with compare and swap updates of the revision_number.\""},{"line_number":56,"context_line":"            \"This method will be removed in Pike.\")"},{"line_number":57,"context_line":"def get_locked_port_and_binding(context, port_id):"},{"line_number":58,"context_line":"    \"\"\"Get port and port binding records for update within transaction.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_a6a3c5b0","line":55,"range":{"start_line":55,"start_character":74,"end_line":55,"end_character":75},"updated":"2017-01-24 16:44:20.000000000","message":"Missing space after dot","commit_id":"072358e510ebe0c1e654db90c541a707fc2a6e63"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b4b7fa3edec91835922f705f829a157c7d274c0f","unresolved":false,"context_lines":[{"line_number":52,"context_line":"@removals.remove("},{"line_number":53,"context_line":"    message\u003d\"Use get_port from inside of a transaction. The revision plugin \""},{"line_number":54,"context_line":"            \"provides protection against concurrent updates to the same \""},{"line_number":55,"context_line":"            \"resource with compare and swap updates of the revision_number.\""},{"line_number":56,"context_line":"            \"This method will be removed in Pike.\")"},{"line_number":57,"context_line":"def get_locked_port_and_binding(context, port_id):"},{"line_number":58,"context_line":"    \"\"\"Get port and port binding records for update within transaction.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_bb5109db","line":55,"range":{"start_line":55,"start_character":74,"end_line":55,"end_character":75},"in_reply_to":"5a3905b3_a6a3c5b0","updated":"2017-01-24 23:03:53.000000000","message":"Done","commit_id":"072358e510ebe0c1e654db90c541a707fc2a6e63"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"59997c1121463db35a421c0cf97be4c03b227cb9","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    message\u003d\"Use get_port from inside of a transaction. The revision plugin \""},{"line_number":54,"context_line":"            \"provides protection against concurrent updates to the same \""},{"line_number":55,"context_line":"            \"resource with compare and swap updates of the revision_number.\""},{"line_number":56,"context_line":"            \"This method will be removed in Pike.\")"},{"line_number":57,"context_line":"def get_locked_port_and_binding(context, port_id):"},{"line_number":58,"context_line":"    \"\"\"Get port and port binding records for update within transaction.\"\"\""},{"line_number":59,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_26a6f5ad","line":56,"range":{"start_line":56,"start_character":12,"end_line":56,"end_character":49},"updated":"2017-01-24 16:44:20.000000000","message":"you can use removal_version\u003d argument instead","commit_id":"072358e510ebe0c1e654db90c541a707fc2a6e63"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b4b7fa3edec91835922f705f829a157c7d274c0f","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    message\u003d\"Use get_port from inside of a transaction. The revision plugin \""},{"line_number":54,"context_line":"            \"provides protection against concurrent updates to the same \""},{"line_number":55,"context_line":"            \"resource with compare and swap updates of the revision_number.\""},{"line_number":56,"context_line":"            \"This method will be removed in Pike.\")"},{"line_number":57,"context_line":"def get_locked_port_and_binding(context, port_id):"},{"line_number":58,"context_line":"    \"\"\"Get port and port binding records for update within transaction.\"\"\""},{"line_number":59,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_db5c15f3","line":56,"range":{"start_line":56,"start_character":12,"end_line":56,"end_character":49},"in_reply_to":"5a3905b3_26a6f5ad","updated":"2017-01-24 23:03:53.000000000","message":"Done","commit_id":"072358e510ebe0c1e654db90c541a707fc2a6e63"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"53a96fbec07c40214429a7f7ba6b561e02cb863e","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    message\u003d\"Use get_port from inside of a transaction. The revision plugin \""},{"line_number":54,"context_line":"            \"provides protection against concurrent updates to the same \""},{"line_number":55,"context_line":"            \"resource with compare and swap updates of the revision_number.\","},{"line_number":56,"context_line":"    removal_version\u003d\u0027Pike\u0027)"},{"line_number":57,"context_line":"def get_locked_port_and_binding(context, port_id):"},{"line_number":58,"context_line":"    \"\"\"Get port and port binding records for update within transaction.\"\"\""},{"line_number":59,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a430d35_5fbb52e5","line":56,"updated":"2017-02-06 17:58:29.000000000","message":"should be Queens now?","commit_id":"aa02400a154c4f6eb93f229652fc0314ae97e992"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"fa44c43187eedccaf9c4af73d7c9093b24b0f0ef","unresolved":false,"context_lines":[{"line_number":451,"context_line":"            except exc.PortNotFound:"},{"line_number":452,"context_line":"                port_db, cur_binding \u003d None, None"},{"line_number":453,"context_line":"            if not port_db or not cur_binding:"},{"line_number":454,"context_line":"                # The port has been deleted concurrently, so just"},{"line_number":455,"context_line":"                # return the unbound result from the initial"},{"line_number":456,"context_line":"                # transaction that completed before the deletion."},{"line_number":457,"context_line":"                LOG.debug(\"Port %s has been deleted concurrently\", port_id)"},{"line_number":458,"context_line":"                return orig_context, False, False"},{"line_number":459,"context_line":"            # Since the mechanism driver bind_port() calls must be made"},{"line_number":460,"context_line":"            # outside a DB transaction locking the port state, it is"},{"line_number":461,"context_line":"            # possible (but unlikely) that the port\u0027s state could change"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a461143_faa4a74b","line":458,"range":{"start_line":454,"start_character":16,"end_line":458,"end_character":49},"updated":"2017-01-31 13:46:24.000000000","message":"Why don\u0027t you put this process into except of L451 instead of L452?","commit_id":"291972bfdad6e4eb26a42faf9be3cb4d8cbe39ef"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"fe24b662dddaca42c5b2ef9ebad938e190597bcf","unresolved":false,"context_lines":[{"line_number":451,"context_line":"            except exc.PortNotFound:"},{"line_number":452,"context_line":"                port_db, cur_binding \u003d None, None"},{"line_number":453,"context_line":"            if not port_db or not cur_binding:"},{"line_number":454,"context_line":"                # The port has been deleted concurrently, so just"},{"line_number":455,"context_line":"                # return the unbound result from the initial"},{"line_number":456,"context_line":"                # transaction that completed before the deletion."},{"line_number":457,"context_line":"                LOG.debug(\"Port %s has been deleted concurrently\", port_id)"},{"line_number":458,"context_line":"                return orig_context, False, False"},{"line_number":459,"context_line":"            # Since the mechanism driver bind_port() calls must be made"},{"line_number":460,"context_line":"            # outside a DB transaction locking the port state, it is"},{"line_number":461,"context_line":"            # possible (but unlikely) that the port\u0027s state could change"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a430d35_f5b99e7a","line":458,"range":{"start_line":454,"start_character":16,"end_line":458,"end_character":49},"in_reply_to":"3a461143_faa4a74b","updated":"2017-02-06 09:08:06.000000000","message":"port_db.port_binding could be None from 450.\n\nget_locked_port_and_binding would return None for both in the case that the binding was empty.","commit_id":"291972bfdad6e4eb26a42faf9be3cb4d8cbe39ef"}],"neutron/tests/unit/plugins/ml2/test_plugin.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"59997c1121463db35a421c0cf97be4c03b227cb9","unresolved":false,"context_lines":[{"line_number":1116,"context_line":"                req \u003d self.new_delete_request(\u0027ports\u0027, port[\u0027port\u0027][\u0027id\u0027])"},{"line_number":1117,"context_line":"                res \u003d req.get_response(self.api)"},{"line_number":1118,"context_line":"                self.assertEqual(204, res.status_int)"},{"line_number":1119,"context_line":"                self.assertGreater(gp.call_count, 1)"},{"line_number":1120,"context_line":"            self.assertRaises("},{"line_number":1121,"context_line":"                exc.PortNotFound, plugin.get_port, ctx, port[\u0027port\u0027][\u0027id\u0027])"},{"line_number":1122,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_a665851e","line":1119,"range":{"start_line":1119,"start_character":16,"end_line":1119,"end_character":52},"updated":"2017-01-24 16:44:20.000000000","message":"why do we even care about the number of calls? :)","commit_id":"072358e510ebe0c1e654db90c541a707fc2a6e63"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b4b7fa3edec91835922f705f829a157c7d274c0f","unresolved":false,"context_lines":[{"line_number":1116,"context_line":"                req \u003d self.new_delete_request(\u0027ports\u0027, port[\u0027port\u0027][\u0027id\u0027])"},{"line_number":1117,"context_line":"                res \u003d req.get_response(self.api)"},{"line_number":1118,"context_line":"                self.assertEqual(204, res.status_int)"},{"line_number":1119,"context_line":"                self.assertGreater(gp.call_count, 1)"},{"line_number":1120,"context_line":"            self.assertRaises("},{"line_number":1121,"context_line":"                exc.PortNotFound, plugin.get_port, ctx, port[\u0027port\u0027][\u0027id\u0027])"},{"line_number":1122,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_7b6401e5","line":1119,"range":{"start_line":1119,"start_character":16,"end_line":1119,"end_character":52},"in_reply_to":"5a3905b3_a665851e","updated":"2017-01-24 23:03:53.000000000","message":"I think the reasoning was just to ensure it retried after the deadlock","commit_id":"072358e510ebe0c1e654db90c541a707fc2a6e63"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"530145fba07161848397b49739a473f70794f8be","unresolved":false,"context_lines":[{"line_number":1116,"context_line":"                req \u003d self.new_delete_request(\u0027ports\u0027, port[\u0027port\u0027][\u0027id\u0027])"},{"line_number":1117,"context_line":"                res \u003d req.get_response(self.api)"},{"line_number":1118,"context_line":"                self.assertEqual(204, res.status_int)"},{"line_number":1119,"context_line":"                self.assertGreater(gp.call_count, 1)"},{"line_number":1120,"context_line":"            self.assertRaises("},{"line_number":1121,"context_line":"                exc.PortNotFound, plugin.get_port, ctx, port[\u0027port\u0027][\u0027id\u0027])"},{"line_number":1122,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_cc02a209","line":1119,"range":{"start_line":1119,"start_character":16,"end_line":1119,"end_character":52},"in_reply_to":"5a3905b3_a665851e","updated":"2017-01-24 20:43:22.000000000","message":"The other thing is about the expected value(1) should be before the actual value(gp.call_count)","commit_id":"072358e510ebe0c1e654db90c541a707fc2a6e63"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b4b7fa3edec91835922f705f829a157c7d274c0f","unresolved":false,"context_lines":[{"line_number":1116,"context_line":"                req \u003d self.new_delete_request(\u0027ports\u0027, port[\u0027port\u0027][\u0027id\u0027])"},{"line_number":1117,"context_line":"                res \u003d req.get_response(self.api)"},{"line_number":1118,"context_line":"                self.assertEqual(204, res.status_int)"},{"line_number":1119,"context_line":"                self.assertGreater(gp.call_count, 1)"},{"line_number":1120,"context_line":"            self.assertRaises("},{"line_number":1121,"context_line":"                exc.PortNotFound, plugin.get_port, ctx, port[\u0027port\u0027][\u0027id\u0027])"},{"line_number":1122,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_9b61add6","line":1119,"range":{"start_line":1119,"start_character":16,"end_line":1119,"end_character":52},"in_reply_to":"5a3905b3_cc02a209","updated":"2017-01-24 23:03:53.000000000","message":"With assertGreater, the one you expect to be larger goes on the left. So it\u0027s the opposite of the regular assertEqual. https://docs.python.org/2/library/unittest.html#unittest.TestCase.assertGreater","commit_id":"072358e510ebe0c1e654db90c541a707fc2a6e63"}]}
