)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"f4deffa77dc937285d728e37d4a8a9723d72e47e","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Do a quick FIP check on port delete"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Get FloatingIP object results in a quite heavy DB request."},{"line_number":10,"context_line":"On port delete it\u0027s in fact done 2 times: lines 1628"},{"line_number":11,"context_line":"and 1635 in current patch\u0027s l3_db.py (please see diff)."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"d7aca85f_a84fef8e","line":9,"range":{"start_line":9,"start_character":30,"end_line":9,"end_character":32},"updated":"2021-04-16 07:29:04.000000000","message":"nitty nit: should be \"is\" probably, but please don\u0027t respin it just for that 😊","commit_id":"32e9ec006178ed015ec289a3353773f52e6ebcd2"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"9ae6e0848c4435d96e5456d190bcc36646b3c395","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Do a quick FIP check on port delete"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Get FloatingIP object results in a quite heavy DB request."},{"line_number":10,"context_line":"On port delete it\u0027s in fact done 2 times: lines 1628"},{"line_number":11,"context_line":"and 1635 in current patch\u0027s l3_db.py (please see diff)."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"d7ac9b48_07ebb8ae","line":9,"range":{"start_line":9,"start_character":30,"end_line":9,"end_character":32},"in_reply_to":"b062ceab_c3260e61","updated":"2021-04-20 09:48:19.000000000","message":"or maybe it was correct but I just misunderstood it :)","commit_id":"32e9ec006178ed015ec289a3353773f52e6ebcd2"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"cbac83f1cdf202b259597f7f96dcd34467b67068","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Do a quick FIP check on port delete"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Get FloatingIP object results in a quite heavy DB request."},{"line_number":10,"context_line":"On port delete it\u0027s in fact done 2 times: lines 1628"},{"line_number":11,"context_line":"and 1635 in current patch\u0027s l3_db.py (please see diff)."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"b062ceab_c3260e61","line":9,"range":{"start_line":9,"start_character":30,"end_line":9,"end_character":32},"in_reply_to":"d7aca85f_a84fef8e","updated":"2021-04-17 07:18:31.000000000","message":"Ah, I meant \"results in\" more like \"leads to\", but I\u0027m not a native speaker so this could be wrong:)","commit_id":"32e9ec006178ed015ec289a3353773f52e6ebcd2"}],"neutron/db/l3_db.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"3d6ccb481cbb7b197036606fce1d609b3883333b","unresolved":true,"context_lines":[{"line_number":1625,"context_line":"                    context, port_id):"},{"line_number":1626,"context_line":"                return []"},{"line_number":1627,"context_line":""},{"line_number":1628,"context_line":"            floating_ip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":1629,"context_line":"                context, fixed_port_id\u003dport_id)"},{"line_number":1630,"context_line":"            router_ids \u003d {fip.router_id for fip in floating_ip_objs}"},{"line_number":1631,"context_line":"            old_fips \u003d {fip.id: fip.to_dict() for fip in floating_ip_objs}"}],"source_content_type":"text/x-python","patch_set":2,"id":"f66c60dd_36b8bec6","line":1628,"updated":"2021-04-12 15:26:07.000000000","message":"A similar comment here as in [1]. In this case you can FloatingIP.get_objects() passing some fields to be retrieved, only the needed ones and not stored in a child DB register (that kills the query performance introducing nested joins). You can request \"id\", \"floating_ip_address\", \"floating_network_id\" and \"fixed_port_id\" (I think those are the 4 params required.\n\nThis will speed up both scenarios: with and without associated FIPs.\n\n[1]https://review.opendev.org/c/openstack/neutron/+/785635/1","commit_id":"d325521ba0d82f2e215320f2e3776b606cd3c6af"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"aa69cf76f728b24d042df0a40b3dff386c630cb0","unresolved":true,"context_lines":[{"line_number":1625,"context_line":"                    context, port_id):"},{"line_number":1626,"context_line":"                return []"},{"line_number":1627,"context_line":""},{"line_number":1628,"context_line":"            floating_ip_objs \u003d l3_obj.FloatingIP.get_objects("},{"line_number":1629,"context_line":"                context, fixed_port_id\u003dport_id)"},{"line_number":1630,"context_line":"            router_ids \u003d {fip.router_id for fip in floating_ip_objs}"},{"line_number":1631,"context_line":"            old_fips \u003d {fip.id: fip.to_dict() for fip in floating_ip_objs}"}],"source_content_type":"text/x-python","patch_set":2,"id":"598e4eca_5fedf0de","line":1628,"in_reply_to":"f66c60dd_36b8bec6","updated":"2021-04-12 15:50:58.000000000","message":"I thought about it, but according to [1] passing \u0027fields\u0027 will not affect DB query..\n\n[1] https://github.com/openstack/neutron/blob/51cccd4b1a7494d186a183a91f102d47bf23630e/neutron/objects/base.py#L619","commit_id":"d325521ba0d82f2e215320f2e3776b606cd3c6af"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"3d6ccb481cbb7b197036606fce1d609b3883333b","unresolved":true,"context_lines":[{"line_number":1639,"context_line":"                                self, context\u003dcontext,"},{"line_number":1640,"context_line":"                                floatingip\u003d{l3_apidef.FLOATINGIP: values},"},{"line_number":1641,"context_line":"                                floatingip_db\u003dfip,"},{"line_number":1642,"context_line":"                                old_floatingip\u003dold_fips[fip.id],"},{"line_number":1643,"context_line":"                                router_ids\u003drouter_ids)"},{"line_number":1644,"context_line":""},{"line_number":1645,"context_line":"        for fip in floating_ip_objs:"}],"source_content_type":"text/x-python","patch_set":2,"id":"4110bc85_f6051009","line":1642,"range":{"start_line":1642,"start_character":32,"end_line":1642,"end_character":64},"updated":"2021-04-12 15:26:07.000000000","message":"nit: now we are optimizing this method, this parameter is not used (please, check it before removing it).","commit_id":"d325521ba0d82f2e215320f2e3776b606cd3c6af"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d0cfb567342b623b8c4596d235f87424679f89a1","unresolved":true,"context_lines":[{"line_number":1639,"context_line":"                                self, context\u003dcontext,"},{"line_number":1640,"context_line":"                                floatingip\u003d{l3_apidef.FLOATINGIP: values},"},{"line_number":1641,"context_line":"                                floatingip_db\u003dfip,"},{"line_number":1642,"context_line":"                                old_floatingip\u003dold_fips[fip.id],"},{"line_number":1643,"context_line":"                                router_ids\u003drouter_ids)"},{"line_number":1644,"context_line":""},{"line_number":1645,"context_line":"        for fip in floating_ip_objs:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff576d92_5be7e5e4","line":1642,"range":{"start_line":1642,"start_character":32,"end_line":1642,"end_character":64},"in_reply_to":"4110bc85_f6051009","updated":"2021-04-13 09:29:11.000000000","message":"I\u0027d leave it as it seems a common practice to pass original and updated states to PRECOMMIT_UPDATE handlers, for example #285","commit_id":"d325521ba0d82f2e215320f2e3776b606cd3c6af"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1e19224b86f8e77e383d6f5be8d6eb0112b5e10a","unresolved":true,"context_lines":[{"line_number":1622,"context_line":"        \"\"\""},{"line_number":1623,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1624,"context_line":"            if not l3_obj.FloatingIP.exists_for_fixed_port_id("},{"line_number":1625,"context_line":"                    context, port_id):"},{"line_number":1626,"context_line":"                return []"},{"line_number":1627,"context_line":""},{"line_number":1628,"context_line":"            floating_ip_objs \u003d l3_obj.FloatingIP.get_objects("}],"source_content_type":"text/x-python","patch_set":6,"id":"b1cfaf2c_6c1c2508","line":1625,"updated":"2021-05-21 10:41:40.000000000","message":"Since [1], why do you use this method?\n\nif not l3_obj.FloatingIP.objects_exist(context, fixed_port_id\u003dport_id):\n  return []\n\n[1]https://review.opendev.org/c/openstack/neutron/+/787681/5/neutron/objects/base.py#923","commit_id":"a3b2f7f4d772c01702489fdf3f39607deea423a1"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"10febec3237365ca88f4db342244fe4e7622aa8d","unresolved":true,"context_lines":[{"line_number":1622,"context_line":"        \"\"\""},{"line_number":1623,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1624,"context_line":"            if not l3_obj.FloatingIP.exists_for_fixed_port_id("},{"line_number":1625,"context_line":"                    context, port_id):"},{"line_number":1626,"context_line":"                return []"},{"line_number":1627,"context_line":""},{"line_number":1628,"context_line":"            floating_ip_objs \u003d l3_obj.FloatingIP.get_objects("}],"source_content_type":"text/x-python","patch_set":6,"id":"d83080f2_a66e7413","line":1625,"in_reply_to":"b1cfaf2c_6c1c2508","updated":"2021-05-21 10:58:36.000000000","message":"The purpose of this patch is to do a quick lightweight check, l3_obj.FloatingIP.objects_exist - does a full query + subqueries regardless of kwargs passed","commit_id":"a3b2f7f4d772c01702489fdf3f39607deea423a1"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"6b9dd54000e83c048f9e96cb671f58be4a7e74f8","unresolved":true,"context_lines":[{"line_number":1622,"context_line":"        \"\"\""},{"line_number":1623,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1624,"context_line":"            if not l3_obj.FloatingIP.exists_for_fixed_port_id("},{"line_number":1625,"context_line":"                    context, port_id):"},{"line_number":1626,"context_line":"                return []"},{"line_number":1627,"context_line":""},{"line_number":1628,"context_line":"            floating_ip_objs \u003d l3_obj.FloatingIP.get_objects("}],"source_content_type":"text/x-python","patch_set":6,"id":"c82b2e3d_09abc2a5","line":1625,"in_reply_to":"d83080f2_a66e7413","updated":"2021-05-26 21:37:22.000000000","message":"my bad, I completely forgot about this new optimization, objects_exist now fits fine here.","commit_id":"a3b2f7f4d772c01702489fdf3f39607deea423a1"}]}
