)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"172fe1cd9a559d37454733a3b371e16fd0c1d3f3","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Add a new cache set for ports which were just processed as"},{"line_number":10,"context_line":"\u0027added\u0027 in last rpc loop cycle. Then skip processing their"},{"line_number":11,"context_line":"security group again in current loop. This is a first step"},{"line_number":12,"context_line":"of not-process-port-twice. A simple cache can not work"},{"line_number":13,"context_line":"for all port processing functions, since there is a case"},{"line_number":14,"context_line":"that port can be processing as \"added\" while the server"},{"line_number":15,"context_line":"side is changing some attribute like QoS. In the next rpc"},{"line_number":16,"context_line":"loop it should be processed again."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Closes-Bug: #1841865"},{"line_number":19,"context_line":"Change-Id: Ie7c3220407f08d45e5388e9aacc7fec257409914"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"3fa7e38b_b624cdb3","line":16,"range":{"start_line":12,"start_character":27,"end_line":16,"end_character":34},"updated":"2019-12-02 15:07:40.000000000","message":"There are more details about this, many many factors could have impacts on port, some of some of them are from port itself, some are related to subnet, network, qos and extended services, for instance: fixed IPs, qos policy, mtu, segmentation, security group rules, remote security group, allowed address pair, admin state, dns, port_security, and so on, it seems interminable... So, any of these can be changed while ovs-agent is processing port as \"added\" concurrently. Then, it should be processed again. Then I have another thought is \"when\", is it  really needed that the port should be processed in next loop? Could we just put it into a queue and processe them for the changed field only? Then the problem will be how to deal with the \"added\", \"updated\" and \"deleted\" procedure in parallel? Complicated!\nSo we should still pay more attention on the port processing efficiency,  we could ignore the double-processing time hopefully.","commit_id":"81d5917d3b913bbb6976c9e3d07863517a2bc909"}],"neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"f4eb323daa3a33ee6eeb4019e67d18b7886b61f9","unresolved":false,"context_lines":[{"line_number":1997,"context_line":"        added_ports \u003d (port_info.get(\u0027added\u0027, set()) - skipped_devices -"},{"line_number":1998,"context_line":"                       binding_no_activated_devices)"},{"line_number":1999,"context_line":"        self._add_port_tag_info(need_binding_devices)"},{"line_number":2000,"context_line":"        updated_ports \u003d port_info.get(\u0027updated\u0027, set()) - self.last_cycle_added"},{"line_number":2001,"context_line":"        self.sg_agent.setup_port_filters(added_ports, updated_ports)"},{"line_number":2002,"context_line":"        LOG.info(\"process_network_ports - iteration:%(iter_num)d - \""},{"line_number":2003,"context_line":"                 \"agent port security group processed in %(elapsed).3f\","}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_757df26b","line":2000,"updated":"2019-12-02 08:26:18.000000000","message":"can it happend that I will create port and than immediately add SG rule to its SG? So it will receive port_update even just after it will be processed as added. What in such case? How this SG rule will be applied if it would go in next iteration?\nMaybe You should compare revision numbers to avoid such problems?","commit_id":"81d5917d3b913bbb6976c9e3d07863517a2bc909"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"172fe1cd9a559d37454733a3b371e16fd0c1d3f3","unresolved":false,"context_lines":[{"line_number":1997,"context_line":"        added_ports \u003d (port_info.get(\u0027added\u0027, set()) - skipped_devices -"},{"line_number":1998,"context_line":"                       binding_no_activated_devices)"},{"line_number":1999,"context_line":"        self._add_port_tag_info(need_binding_devices)"},{"line_number":2000,"context_line":"        updated_ports \u003d port_info.get(\u0027updated\u0027, set()) - self.last_cycle_added"},{"line_number":2001,"context_line":"        self.sg_agent.setup_port_filters(added_ports, updated_ports)"},{"line_number":2002,"context_line":"        LOG.info(\"process_network_ports - iteration:%(iter_num)d - \""},{"line_number":2003,"context_line":"                 \"agent port security group processed in %(elapsed).3f\","}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_f6c5655d","line":2000,"in_reply_to":"3fa7e38b_757df26b","updated":"2019-12-02 15:07:40.000000000","message":"It could happen! Please see my comments in the commit message, this is now too complicated to accomplish.\nA simple revision num check may not work sometimes, such as a name change, we need to check every related attribute of every related resource if we want to skip when no real change. Check condition sets will increase multiply.","commit_id":"81d5917d3b913bbb6976c9e3d07863517a2bc909"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"c446c426ed6763a8cd226fc14cfb85b50c64a565","unresolved":false,"context_lines":[{"line_number":1997,"context_line":"        added_ports \u003d (port_info.get(\u0027added\u0027, set()) - skipped_devices -"},{"line_number":1998,"context_line":"                       binding_no_activated_devices)"},{"line_number":1999,"context_line":"        self._add_port_tag_info(need_binding_devices)"},{"line_number":2000,"context_line":"        updated_ports \u003d port_info.get(\u0027updated\u0027, set()) - self.last_cycle_added"},{"line_number":2001,"context_line":"        self.sg_agent.setup_port_filters(added_ports, updated_ports)"},{"line_number":2002,"context_line":"        LOG.info(\"process_network_ports - iteration:%(iter_num)d - \""},{"line_number":2003,"context_line":"                 \"agent port security group processed in %(elapsed).3f\","}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_7862b717","line":2000,"in_reply_to":"3fa7e38b_f6c5655d","updated":"2019-12-03 09:37:39.000000000","message":"So I don\u0027t think we can merge this as this introduces potential race condition and regression when some SG/QOS rules will not be applied to the port in fact.","commit_id":"81d5917d3b913bbb6976c9e3d07863517a2bc909"}]}
