)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"61da0ac7fa84dcc8964fb52a4494b6a03eade26a","unresolved":false,"context_lines":[{"line_number":11,"context_line":"detrimental to performance and scalability of the database"},{"line_number":12,"context_line":"performance code in Neutron due to the lock contention it produces."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"SELECT FOR UPDATE can be entirely avoided in add_endpoint methods"},{"line_number":15,"context_line":"with the use of single-shot SELECT and INSERT expressions and the"},{"line_number":16,"context_line":"correction of VxlanEndpoint primary key: indeed previously it was not"},{"line_number":17,"context_line":"possible to create multiple endpoints with the same ip, now the model"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"baada198_c82e29ab","line":14,"updated":"2014-07-31 15:47:51.000000000","message":"Where did you remove with_lockmode(\u0027update\u0027)?  I can\u0027t see it in add_endpoint","commit_id":"9bdc6270c5ced8afef41bee7cac5dc844fe237d9"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"303ecc7dd6f433e5102fbfac4be0071168358e75","unresolved":false,"context_lines":[{"line_number":11,"context_line":"detrimental to performance and scalability of the database"},{"line_number":12,"context_line":"performance code in Neutron due to the lock contention it produces."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"SELECT FOR UPDATE can be entirely avoided in add_endpoint methods"},{"line_number":15,"context_line":"with the use of single-shot SELECT and INSERT expressions and the"},{"line_number":16,"context_line":"correction of VxlanEndpoint primary key: indeed previously it was not"},{"line_number":17,"context_line":"possible to create multiple endpoints with the same ip, now the model"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"baada198_b52869ef","line":14,"in_reply_to":"baada198_c82e29ab","updated":"2014-07-31 16:29:39.000000000","message":"the change removes with_lockmode in type_vxlan, the change updates type_gre to unify implementations and more important to correct current implementation which is not safe.","commit_id":"9bdc6270c5ced8afef41bee7cac5dc844fe237d9"}],"neutron/db/migration/alembic_migrations/versions/4eba2f05c2f4_correct_vxlan_endpoint_primary_key.py":[{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"3f022ca2d8dc30eb34d5f786715eb1c78f9cb89e","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        return"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    context \u003d op.get_context()"},{"line_number":58,"context_line":"    if context.bind.dialect.name \u003d\u003d \u0027sqlite\u0027:"},{"line_number":59,"context_line":"        # sqlite does not support op.drop_constraint"},{"line_number":60,"context_line":"        # we must create an new table with the correct primary key"},{"line_number":61,"context_line":"        # and populate it"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_e5435d6a","line":58,"updated":"2014-07-09 12:56:23.000000000","message":"As far as I remember sqlite is used only in unit test. Migrations should work only on MySQL and PostgreSQL dialects. So why does it need here?","commit_id":"1521650ae12d1eac76b51d5914e50e929f29eaf3"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"25060fc9baa1ac533833fb310ed2492cfe880c7e","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        return"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    context \u003d op.get_context()"},{"line_number":58,"context_line":"    if context.bind.dialect.name \u003d\u003d \u0027sqlite\u0027:"},{"line_number":59,"context_line":"        # sqlite does not support op.drop_constraint"},{"line_number":60,"context_line":"        # we must create an new table with the correct primary key"},{"line_number":61,"context_line":"        # and populate it"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_60765b08","line":58,"in_reply_to":"baada198_e5435d6a","updated":"2014-07-09 13:17:38.000000000","message":"Done","commit_id":"1521650ae12d1eac76b51d5914e50e929f29eaf3"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"a4df5424629d83185302e16d3c9eaae2cc001a28","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    _bothgrade(active_plugins, options, \u0027ip_address\u0027, \u0027udp_port\u0027)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"def _bothgrade(active_plugins\u003dNone, options\u003dNone, *new_primary_key_cols):"},{"line_number":54,"context_line":"    if not migration.should_run(active_plugins, migration_for_plugins):"},{"line_number":55,"context_line":"        return"},{"line_number":56,"context_line":"    op.drop_constraint(PK_NAME, TABLE_NAME, type_\u003d\u0027primary\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_8fc39b89","line":53,"range":{"start_line":53,"start_character":30,"end_line":53,"end_character":34},"updated":"2014-07-09 14:52:34.000000000","message":"default values and \"options\" argument seem unnecessary.","commit_id":"69ccaecab59f73e964abdb94dacbc33dbbb9d21f"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"ab4f4e074a4deaedddbc39e28829544f2fb47317","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def upgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":37,"context_line":"    op.drop_constraint(PK_NAME, TABLE_NAME, type_\u003d\u0027primary\u0027)"},{"line_number":38,"context_line":"    op.create_primary_key(PK_NAME, TABLE_NAME, cols\u003d[\u0027ip_address\u0027])"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_eaeb3e76","line":38,"updated":"2014-07-16 08:28:52.000000000","message":"List of columns is a positional parameter. Check this http://alembic.readthedocs.org/en/latest/ops.html#alembic.operations.Operations.create_primary_key","commit_id":"55487042ec942cdee88044f032e5fabde18dde6a"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"d77b5a80b41d3689ca9843f1ed13c4dced59cb77","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def upgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":37,"context_line":"    op.drop_constraint(PK_NAME, TABLE_NAME, type_\u003d\u0027primary\u0027)"},{"line_number":38,"context_line":"    op.create_primary_key(PK_NAME, TABLE_NAME, cols\u003d[\u0027ip_address\u0027])"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_f504c819","line":38,"in_reply_to":"baada198_459dfb65","updated":"2014-07-17 09:26:19.000000000","message":"I\u0027m not sure what\u0027s the point here\n\n\u003e\u003e\u003e def ciccio(param1, param2, param3\u003dNone):\n...     print param1, param2, param3\n... \n\u003e\u003e\u003e ciccio(1,2,3)\n1 2 3\n\u003e\u003e\u003e ciccio(1,2,param3\u003d3)\n1 2 3\n\u003e\u003e\u003e ciccio(1,wrong\u003d2,param3\u003d3)\nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\nTypeError: ciccio() got an unexpected keyword argument \u0027wrong\u0027\n\u003e\u003e\u003e ciccio(1,param2\u003d2,param3\u003d3)\n1 2 3\n\u003e\u003e\u003e ciccio(param1\u003d1,param2\u003d2,param3\u003d3)\n1 2 3","commit_id":"55487042ec942cdee88044f032e5fabde18dde6a"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e4fd75362230d9ae24ac35546d39ccccd617cd36","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def upgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":37,"context_line":"    op.drop_constraint(PK_NAME, TABLE_NAME, type_\u003d\u0027primary\u0027)"},{"line_number":38,"context_line":"    op.create_primary_key(PK_NAME, TABLE_NAME, cols\u003d[\u0027ip_address\u0027])"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_459dfb65","line":38,"in_reply_to":"baada198_eaeb3e76","updated":"2014-07-16 08:44:39.000000000","message":"no, primary key columns can be provided as positional parameter.\n\nBut in all migrations scripts, columns associated to constraints/foreign keys are provided as keyword parameter.","commit_id":"55487042ec942cdee88044f032e5fabde18dde6a"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e4daa855f9203c07374f63df258c9fe997608e60","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def upgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":37,"context_line":"    op.drop_constraint(PK_NAME, TABLE_NAME, type_\u003d\u0027primary\u0027)"},{"line_number":38,"context_line":"    op.create_primary_key(PK_NAME, TABLE_NAME, cols\u003d[\u0027ip_address\u0027])"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_7be7c9ac","line":38,"in_reply_to":"baada198_f504c819","updated":"2014-07-17 10:09:30.000000000","message":"me neither.\n\nI prefer using keyword argument to clarify create_primary_key signature (not often used).","commit_id":"55487042ec942cdee88044f032e5fabde18dde6a"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"d77b5a80b41d3689ca9843f1ed13c4dced59cb77","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":42,"context_line":"    op.drop_constraint(PK_NAME, TABLE_NAME, type_\u003d\u0027primary\u0027)"},{"line_number":43,"context_line":"    op.create_primary_key(PK_NAME, TABLE_NAME, cols\u003d[\u0027ip_address\u0027, \u0027udp_port\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_f88e7f78","line":43,"updated":"2014-07-17 09:26:19.000000000","message":"Can we be sure there wasn\u0027t a precise reasons for having ip:port as primary key?","commit_id":"55487042ec942cdee88044f032e5fabde18dde6a"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e4daa855f9203c07374f63df258c9fe997608e60","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":42,"context_line":"    op.drop_constraint(PK_NAME, TABLE_NAME, type_\u003d\u0027primary\u0027)"},{"line_number":43,"context_line":"    op.create_primary_key(PK_NAME, TABLE_NAME, cols\u003d[\u0027ip_address\u0027, \u0027udp_port\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_5b33e512","line":43,"in_reply_to":"baada198_f88e7f78","updated":"2014-07-17 10:09:30.000000000","message":"After discussing with Kyle, OVS supports multiple endpoints on the same ip (with different ports), neutron only allows one endpoint per ip (why?). But the model does not reflect it (possible but quite improbable race condition source).","commit_id":"55487042ec942cdee88044f032e5fabde18dde6a"}],"neutron/plugins/ml2/drivers/type_gre.py":[{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"61da0ac7fa84dcc8964fb52a4494b6a03eade26a","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    def add_endpoint(self, ip):"},{"line_number":173,"context_line":"        LOG.debug(_(\"add_gre_endpoint() called for ip %s\"), ip)"},{"line_number":174,"context_line":"        session \u003d db_api.get_session()"},{"line_number":175,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":176,"context_line":"            try:"},{"line_number":177,"context_line":"                gre_endpoint \u003d (session.query(GreEndpoints)."},{"line_number":178,"context_line":"                                filter_by(ip_address\u003dip).one())"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_2310a6ff","side":"PARENT","line":175,"updated":"2014-07-31 15:47:51.000000000","message":"why removing session.begin ? The session needs to be started anyway, right?","commit_id":"f32c0ebe68f0ad27ac7a9717ef3f6e3406f953a1"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"303ecc7dd6f433e5102fbfac4be0071168358e75","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    def add_endpoint(self, ip):"},{"line_number":173,"context_line":"        LOG.debug(_(\"add_gre_endpoint() called for ip %s\"), ip)"},{"line_number":174,"context_line":"        session \u003d db_api.get_session()"},{"line_number":175,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":176,"context_line":"            try:"},{"line_number":177,"context_line":"                gre_endpoint \u003d (session.query(GreEndpoints)."},{"line_number":178,"context_line":"                                filter_by(ip_address\u003dip).one())"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_d52b1de8","side":"PARENT","line":175,"in_reply_to":"baada198_2310a6ff","updated":"2014-07-31 16:29:39.000000000","message":"session.begin is not required because we have no transaction need: the session is not inherited nor the action must be done in a transaction.\n\nIf we use session.begin we need to handle correctly the transaction cleaning when the error appends:\n\n  try:\n    with session.begin(): # insert transaction\n      # insert\n  except db_exc.DBDuplicateEntry:\n    # select endpoint, can not be done using insert-transaction because it\u0027s broken!","commit_id":"f32c0ebe68f0ad27ac7a9717ef3f6e3406f953a1"}],"neutron/plugins/ml2/drivers/type_vxlan.py":[{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"f077b5bb1ad43e18021d8ea5408d72ac924fc4b2","unresolved":false,"context_lines":[{"line_number":202,"context_line":"            vxlan_endpoint.save(session)"},{"line_number":203,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":204,"context_line":"            vxlan_endpoint \u003d (session.query(VxlanEndpoints)."},{"line_number":205,"context_line":"                              filter_by(ip_address\u003dip).one())"},{"line_number":206,"context_line":"            LOG.warning(_(\"Vxlan endpoint with ip %s already exists\"), ip)"},{"line_number":207,"context_line":"        return vxlan_endpoint"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_e03688b3","line":205,"updated":"2014-07-24 21:18:33.000000000","message":"well, theoretically it\u0027s no better: endpoint could have been deleted between catching exception and querying object, may we just return vxlan_endpoint here?","commit_id":"ba3f15e471dba6ef94b2208940cc2a8510769622"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"f30a0d5754c9b27dcd79ad19265e209a62e6b9ab","unresolved":false,"context_lines":[{"line_number":202,"context_line":"            vxlan_endpoint.save(session)"},{"line_number":203,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":204,"context_line":"            vxlan_endpoint \u003d (session.query(VxlanEndpoints)."},{"line_number":205,"context_line":"                              filter_by(ip_address\u003dip).one())"},{"line_number":206,"context_line":"            LOG.warning(_(\"Vxlan endpoint with ip %s already exists\"), ip)"},{"line_number":207,"context_line":"        return vxlan_endpoint"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_607b5829","line":205,"in_reply_to":"baada198_e03688b3","updated":"2014-07-24 21:20:59.000000000","message":"it\u0027s not possible to delete endpoints AFAIK","commit_id":"ba3f15e471dba6ef94b2208940cc2a8510769622"}],"neutron/tests/unit/ml2/test_type_vxlan.py":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"6ebc064cf1a209cf0a6a685292a8b222a2f86965","unresolved":false,"context_lines":[{"line_number":248,"context_line":"    def test_add_same_ip_endpoints(self):"},{"line_number":249,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_ONE, VXLAN_UDP_PORT_ONE)"},{"line_number":250,"context_line":"        observed \u003d self.driver.add_endpoint(TUNNEL_IP_ONE, VXLAN_UDP_PORT_TWO)"},{"line_number":251,"context_line":"        self.assertEqual(VXLAN_UDP_PORT_ONE, observed[\u0027udp_port\u0027])"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"    def test_add_same_ip_endpoints_warn(self):"},{"line_number":254,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_ONE, VXLAN_UDP_PORT_ONE)"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_4aa35543","line":251,"updated":"2014-07-29 12:01:31.000000000","message":"Nit: I don\u0027t think it\u0027s really necessary to have two test cases here. This return value could be checked in the test below.","commit_id":"d22539c459cf94b6f221377eac357a2ea5c22c0b"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"8548506aa5911c67ab037ee19eaca0e736eb224d","unresolved":false,"context_lines":[{"line_number":248,"context_line":"    def test_add_same_ip_endpoints(self):"},{"line_number":249,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_ONE, VXLAN_UDP_PORT_ONE)"},{"line_number":250,"context_line":"        observed \u003d self.driver.add_endpoint(TUNNEL_IP_ONE, VXLAN_UDP_PORT_TWO)"},{"line_number":251,"context_line":"        self.assertEqual(VXLAN_UDP_PORT_ONE, observed[\u0027udp_port\u0027])"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"    def test_add_same_ip_endpoints_warn(self):"},{"line_number":254,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_ONE, VXLAN_UDP_PORT_ONE)"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_737e506f","line":251,"in_reply_to":"baada198_4aa35543","updated":"2014-07-29 13:04:07.000000000","message":"Done","commit_id":"d22539c459cf94b6f221377eac357a2ea5c22c0b"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"6ebc064cf1a209cf0a6a685292a8b222a2f86965","unresolved":false,"context_lines":[{"line_number":254,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_ONE, VXLAN_UDP_PORT_ONE)"},{"line_number":255,"context_line":"        with mock.patch.object(type_vxlan.LOG, \u0027warning\u0027) as log_warn:"},{"line_number":256,"context_line":"            self.driver.add_endpoint(TUNNEL_IP_ONE, VXLAN_UDP_PORT_TWO)"},{"line_number":257,"context_line":"        log_warn.assert_called_once_with(mock.ANY, TUNNEL_IP_ONE)"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"class VxlanTypeMultiRangeTest(base.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_0a75dd32","line":257,"updated":"2014-07-29 12:01:31.000000000","message":"Nit: Strictly speaking log_warn goes out of scope after its context block ends.","commit_id":"d22539c459cf94b6f221377eac357a2ea5c22c0b"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"8548506aa5911c67ab037ee19eaca0e736eb224d","unresolved":false,"context_lines":[{"line_number":254,"context_line":"        self.driver.add_endpoint(TUNNEL_IP_ONE, VXLAN_UDP_PORT_ONE)"},{"line_number":255,"context_line":"        with mock.patch.object(type_vxlan.LOG, \u0027warning\u0027) as log_warn:"},{"line_number":256,"context_line":"            self.driver.add_endpoint(TUNNEL_IP_ONE, VXLAN_UDP_PORT_TWO)"},{"line_number":257,"context_line":"        log_warn.assert_called_once_with(mock.ANY, TUNNEL_IP_ONE)"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"class VxlanTypeMultiRangeTest(base.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_338cd880","line":257,"in_reply_to":"baada198_0a75dd32","updated":"2014-07-29 13:04:07.000000000","message":"Done","commit_id":"d22539c459cf94b6f221377eac357a2ea5c22c0b"}]}
