)]}'
{"neutron/db/db_base_plugin_v2.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"a72d58e03501ede8b1b0e8bbc750853fd111bfdf","unresolved":true,"context_lines":[{"line_number":1565,"context_line":"                                      page_reverse\u003dpage_reverse)"},{"line_number":1566,"context_line":"        items \u003d [self._make_port_dict(c, fields, bulk\u003dTrue) for c in query]"},{"line_number":1567,"context_line":"        # TODO(obondarev): use neutron_lib constant"},{"line_number":1568,"context_line":"        resource_extend.apply_funcs(\u0027ports_bulk\u0027, items, None)"},{"line_number":1569,"context_line":"        if limit and page_reverse:"},{"line_number":1570,"context_line":"            items.reverse()"},{"line_number":1571,"context_line":"        return items"}],"source_content_type":"text/x-python","patch_set":1,"id":"c8c99e7c_e498d7ce","line":1568,"updated":"2020-11-25 14:49:53.000000000","message":"I\u0027m in favor of optimizing the code to speed up any OVO retrieval, but maybe not in this way. The \"_make_***_dict\" method should be the one calling \"resource_extend.apply_funcs\" and only there for just one OVO.\n\nLet me ask you: we are passing the full OVO (and the db_obj inside this OVO) or the DB object to \"_make_port_dict\". Because of Trunk and SubPorts DB models, you should have inside DB object, the references to those SubPorts. That means you don\u0027t need to make any DB call.","commit_id":"a700f5d91424951d98aaa96cc552c68e827d7976"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"6ba1d19783c2de4ff86c8f72a8aaa72dbb74aee6","unresolved":true,"context_lines":[{"line_number":1565,"context_line":"                                      page_reverse\u003dpage_reverse)"},{"line_number":1566,"context_line":"        items \u003d [self._make_port_dict(c, fields, bulk\u003dTrue) for c in query]"},{"line_number":1567,"context_line":"        # TODO(obondarev): use neutron_lib constant"},{"line_number":1568,"context_line":"        resource_extend.apply_funcs(\u0027ports_bulk\u0027, items, None)"},{"line_number":1569,"context_line":"        if limit and page_reverse:"},{"line_number":1570,"context_line":"            items.reverse()"},{"line_number":1571,"context_line":"        return items"}],"source_content_type":"text/x-python","patch_set":1,"id":"964e9633_703343fa","line":1568,"in_reply_to":"3de7d626_523b7bad","updated":"2020-11-26 14:52:32.000000000","message":"New bug was just filed: https://bugs.launchpad.net/neutron/+bug/1905726 - I think current approach could be applied to QoS extender, will come up with it soon","commit_id":"a700f5d91424951d98aaa96cc552c68e827d7976"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"f42b3a31c921ccd370660bc7d76829da6d9be1b6","unresolved":true,"context_lines":[{"line_number":1565,"context_line":"                                      page_reverse\u003dpage_reverse)"},{"line_number":1566,"context_line":"        items \u003d [self._make_port_dict(c, fields, bulk\u003dTrue) for c in query]"},{"line_number":1567,"context_line":"        # TODO(obondarev): use neutron_lib constant"},{"line_number":1568,"context_line":"        resource_extend.apply_funcs(\u0027ports_bulk\u0027, items, None)"},{"line_number":1569,"context_line":"        if limit and page_reverse:"},{"line_number":1570,"context_line":"            items.reverse()"},{"line_number":1571,"context_line":"        return items"}],"source_content_type":"text/x-python","patch_set":1,"id":"3de7d626_523b7bad","line":1568,"in_reply_to":"c8c99e7c_e498d7ce","updated":"2020-11-25 15:28:56.000000000","message":"\u003e I\u0027m in favor of optimizing the code to speed up any OVO retrieval, but maybe not in this way. The \"_make_***_dict\" method should be the one calling \"resource_extend.apply_funcs\" and only there for just one OVO.\n\napply_funcs() is already being called not only inside \"_make_***_dict\" methods. Anyway I\u0027d like us to extend this concept in favor of optimization: pass the info to apply_funcs() that current operation is a bulk one, so extenders for single object could offload some heavy pieces (DB calls) to later \"bulk\" extenders. port-list performance is quite important IMO and it already suffers from such one-by-one extenders, more to come..\n\n\u003e Let me ask you: we are passing the full OVO (and the db_obj inside this OVO) or the DB object to \"_make_port_dict\". Because of Trunk and SubPorts DB models, you should have inside DB object, the references to those SubPorts. That means you don\u0027t need to make any DB call.\n\nports DB call is needed just for mac_address which is not part of SubPort model.","commit_id":"a700f5d91424951d98aaa96cc552c68e827d7976"}],"neutron/services/trunk/plugin.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"f42b3a31c921ccd370660bc7d76829da6d9be1b6","unresolved":true,"context_lines":[{"line_number":94,"context_line":"    @staticmethod"},{"line_number":95,"context_line":"    # TODO(obondarev): use neutron_lib constant"},{"line_number":96,"context_line":"    @resource_extend.extends([\u0027ports_bulk\u0027])"},{"line_number":97,"context_line":"    def _extend_port_list_trunk_details(ports_res, noop):"},{"line_number":98,"context_line":"        \"\"\"Add trunk subport details to a list of ports.\"\"\""},{"line_number":99,"context_line":"        subport_ids \u003d []"},{"line_number":100,"context_line":"        trunk_ports \u003d []"}],"source_content_type":"text/x-python","patch_set":1,"id":"d068caef_803b811a","line":97,"range":{"start_line":97,"start_character":8,"end_line":97,"end_character":39},"updated":"2020-11-25 15:28:56.000000000","message":"I\u0027ll rename it to \"_extend_port_trunk_details_bulk\" for consistence and readability","commit_id":"a700f5d91424951d98aaa96cc552c68e827d7976"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"a72d58e03501ede8b1b0e8bbc750853fd111bfdf","unresolved":true,"context_lines":[{"line_number":115,"context_line":"            for subp in tp[\u0027trunk_details\u0027][\u0027subports\u0027]:"},{"line_number":116,"context_line":"                subp[\u0027mac_address\u0027] \u003d subport_macs[subp[\u0027port_id\u0027]]"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        return ports_res"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def check_compatibility(self):"},{"line_number":121,"context_line":"        \"\"\"Verify the plugin can load correctly and fail otherwise.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"379d5c3a_204424cb","line":118,"range":{"start_line":118,"start_character":15,"end_line":118,"end_character":24},"updated":"2020-11-25 14:49:53.000000000","message":"1) Based on my comment in [1], we should not need this method.\n2) \"ports_res\" is not updated.\n\n\n[1]https://review.opendev.org/c/openstack/neutron/+/763777/1/neutron/db/db_base_plugin_v2.py#1566","commit_id":"a700f5d91424951d98aaa96cc552c68e827d7976"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"f42b3a31c921ccd370660bc7d76829da6d9be1b6","unresolved":true,"context_lines":[{"line_number":115,"context_line":"            for subp in tp[\u0027trunk_details\u0027][\u0027subports\u0027]:"},{"line_number":116,"context_line":"                subp[\u0027mac_address\u0027] \u003d subport_macs[subp[\u0027port_id\u0027]]"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        return ports_res"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def check_compatibility(self):"},{"line_number":121,"context_line":"        \"\"\"Verify the plugin can load correctly and fail otherwise.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"8aef7c7e_4bda1378","line":118,"range":{"start_line":118,"start_character":15,"end_line":118,"end_character":24},"in_reply_to":"379d5c3a_204424cb","updated":"2020-11-25 15:28:56.000000000","message":"\u003e 1) Based on my comment in [1], we should not need this method.\n\nAnswered inline.\n\n\u003e 2) \"ports_res\" is not updated.\n\nIt\u0027s updated indirectly through trunk_ports (subset of ports_res) at #116\nJust to avoid iterate whole port_res once again.","commit_id":"a700f5d91424951d98aaa96cc552c68e827d7976"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"ca4ba76cda4450a02d8e292ddf4ab77e4f7d06d2","unresolved":true,"context_lines":[{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    @staticmethod"},{"line_number":95,"context_line":"    # TODO(obondarev): use neutron_lib constant"},{"line_number":96,"context_line":"    @resource_extend.extends([\u0027ports_bulk\u0027])"},{"line_number":97,"context_line":"    def _extend_port_trunk_details_bulk(ports_res, noop):"},{"line_number":98,"context_line":"        \"\"\"Add trunk subport details to a list of ports.\"\"\""},{"line_number":99,"context_line":"        subport_ids \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"e88baab8_242c1109","line":96,"range":{"start_line":96,"start_character":4,"end_line":96,"end_character":44},"updated":"2020-12-17 08:28:40.000000000","message":"Very smart","commit_id":"6fcbef7fd50c10b3bfbdf6fcfb5e1a7a64d2a60b"}]}
