)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"951b67971f002b041ed9860178934f9989628264","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Yong Sheng Gong \u003cgongysh@unitedstack.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-12-12 15:09:31 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"synchronize ovs agent\u0027s rpc handlers and main thread"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I684db91e155a86bc20686dc3e372ec915583c107"},{"line_number":10,"context_line":"Closes-Bug: #1260185"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAATn%2F9WP0%3D","line":7,"updated":"2013-12-12 12:29:08.000000000","message":"Please add more of a description of why this commit is being done to set a context for the reader.","commit_id":"e1efb687b709fa9ec48d348be1a064f970ac4ae7"}],"neutron/plugins/openvswitch/agent/ovs_neutron_agent.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"e9915c63e815ef8bc21d856c9accf5a1a0a4706a","unresolved":false,"context_lines":[{"line_number":295,"context_line":"            LOG.debug(_(\"Network %s not used on agent.\"), network_id)"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    @q_utils.synchronized(\u0027ovs-agent\u0027)"},{"line_number":298,"context_line":"    def port_update(self, context, **kwargs):"},{"line_number":299,"context_line":"        LOG.debug(_(\"port_update received\"))"},{"line_number":300,"context_line":"        port \u003d kwargs.get(\u0027port\u0027)"},{"line_number":301,"context_line":"        # Validate that port is on OVS"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9K%2BI%3D","line":298,"updated":"2013-12-16 00:34:18.000000000","message":"This particular method operates on different resources wrt the others being synchronized here; therefore this perhaps doesn\u0027t need to use the same lock.\n\nOn another note, I am dealing with this specific method in another patch, and since I think Yong is one of the most knowledgeable devs of the OVS agent, his review contribution will be more than welcome: https://review.openstack.org/#/c/61964/","commit_id":"e1efb687b709fa9ec48d348be1a064f970ac4ae7"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"e9915c63e815ef8bc21d856c9accf5a1a0a4706a","unresolved":false,"context_lines":[{"line_number":347,"context_line":"        if not self.l2_pop:"},{"line_number":348,"context_line":"            self.setup_tunnel_port(tun_name, tunnel_ip, tunnel_type)"},{"line_number":349,"context_line":""},{"line_number":350,"context_line":"    @q_utils.synchronized(\u0027ovs-agent\u0027)"},{"line_number":351,"context_line":"    def fdb_add(self, context, fdb_entries):"},{"line_number":352,"context_line":"        LOG.debug(_(\"fdb_add received\"))"},{"line_number":353,"context_line":"        for network_id, values in fdb_entries.items():"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9K9k%3D","line":350,"updated":"2013-12-16 00:34:18.000000000","message":"I am not 100% sure here but I think while the fdb_xxx routine surely might collide, perhaps they can safely be executed independently of the other routines being synchronized in this patch.","commit_id":"e1efb687b709fa9ec48d348be1a064f970ac4ae7"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"951b67971f002b041ed9860178934f9989628264","unresolved":false,"context_lines":[{"line_number":1116,"context_line":"                      {\u0027iter_num\u0027: self.iter_num,"},{"line_number":1117,"context_line":"                       \u0027elapsed\u0027: time.time() - start})"},{"line_number":1118,"context_line":"            # notify plugin about port deltas"},{"line_number":1119,"context_line":"            if port_info:"},{"line_number":1120,"context_line":"                LOG.debug(_(\"Agent loop has new devices!\"))"},{"line_number":1121,"context_line":"                # If treat devices fails - must resync with plugin"},{"line_number":1122,"context_line":"                sync \u003d self.process_network_ports(port_info)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9WQE%3D","line":1119,"updated":"2013-12-12 12:29:08.000000000","message":"Consider further extraction of L1118-1131 and L1132-1155 into separate functions with descriptive names.","commit_id":"e1efb687b709fa9ec48d348be1a064f970ac4ae7"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"951b67971f002b041ed9860178934f9989628264","unresolved":false,"context_lines":[{"line_number":1118,"context_line":"            # notify plugin about port deltas"},{"line_number":1119,"context_line":"            if port_info:"},{"line_number":1120,"context_line":"                LOG.debug(_(\"Agent loop has new devices!\"))"},{"line_number":1121,"context_line":"                # If treat devices fails - must resync with plugin"},{"line_number":1122,"context_line":"                sync \u003d self.process_network_ports(port_info)"},{"line_number":1123,"context_line":"                LOG.debug(_(\"Agent rpc_loop - iteration:%(iter_num)d -\""},{"line_number":1124,"context_line":"                            \"ports processed. Elapsed:%(elapsed).3f\"),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9WS0%3D","line":1121,"updated":"2013-12-12 12:29:08.000000000","message":"\"treat devices\"?","commit_id":"e1efb687b709fa9ec48d348be1a064f970ac4ae7"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"951b67971f002b041ed9860178934f9989628264","unresolved":false,"context_lines":[{"line_number":1120,"context_line":"                LOG.debug(_(\"Agent loop has new devices!\"))"},{"line_number":1121,"context_line":"                # If treat devices fails - must resync with plugin"},{"line_number":1122,"context_line":"                sync \u003d self.process_network_ports(port_info)"},{"line_number":1123,"context_line":"                LOG.debug(_(\"Agent rpc_loop - iteration:%(iter_num)d -\""},{"line_number":1124,"context_line":"                            \"ports processed. Elapsed:%(elapsed).3f\"),"},{"line_number":1125,"context_line":"                          {\u0027iter_num\u0027: self.iter_num,"},{"line_number":1126,"context_line":"                           \u0027elapsed\u0027: time.time() - start})"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9WSs%3D","line":1123,"updated":"2013-12-12 12:29:08.000000000","message":"Add space at end of string.","commit_id":"e1efb687b709fa9ec48d348be1a064f970ac4ae7"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"951b67971f002b041ed9860178934f9989628264","unresolved":false,"context_lines":[{"line_number":1125,"context_line":"                          {\u0027iter_num\u0027: self.iter_num,"},{"line_number":1126,"context_line":"                           \u0027elapsed\u0027: time.time() - start})"},{"line_number":1127,"context_line":"                ports \u003d port_info[\u0027current\u0027]"},{"line_number":1128,"context_line":"                port_stats[\u0027regular\u0027][\u0027added\u0027] \u003d ("},{"line_number":1129,"context_line":"                    len(port_info.get(\u0027added\u0027, [])))"},{"line_number":1130,"context_line":"                port_stats[\u0027regular\u0027][\u0027removed\u0027] \u003d ("},{"line_number":1131,"context_line":"                    len(port_info.get(\u0027removed\u0027, [])))"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9WQg%3D","line":1128,"updated":"2013-12-12 12:29:08.000000000","message":"L1128-L1131 are similar to L1150-1154. Maybe consider extracting to a function, like:\nupdate_stats(\u0027regular\u0027, port_stats, port_info)","commit_id":"e1efb687b709fa9ec48d348be1a064f970ac4ae7"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"951b67971f002b041ed9860178934f9989628264","unresolved":false,"context_lines":[{"line_number":1133,"context_line":"            if self.ancillary_brs:"},{"line_number":1134,"context_line":"                port_info \u003d self.update_ancillary_ports("},{"line_number":1135,"context_line":"                    ancillary_ports)"},{"line_number":1136,"context_line":"                LOG.debug(_(\"Agent rpc_loop - iteration:%(iter_num)d -\""},{"line_number":1137,"context_line":"                            \"ancillary port info retrieved. \""},{"line_number":1138,"context_line":"                            \"Elapsed:%(elapsed).3f\"),"},{"line_number":1139,"context_line":"                          {\u0027iter_num\u0027: self.iter_num,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9WSo%3D","line":1136,"updated":"2013-12-12 12:29:08.000000000","message":"Add space at end of line.","commit_id":"e1efb687b709fa9ec48d348be1a064f970ac4ae7"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"e9915c63e815ef8bc21d856c9accf5a1a0a4706a","unresolved":false,"context_lines":[{"line_number":1173,"context_line":"                sync, ports, tunnel_sync, ancillary_ports \u003d ("},{"line_number":1174,"context_line":"                    self._rpc_loop_one_iteration("},{"line_number":1175,"context_line":"                        sync, ports, ancillary_ports, tunnel_sync,"},{"line_number":1176,"context_line":"                        polling_manager, start, port_stats))"},{"line_number":1177,"context_line":"            except Exception:"},{"line_number":1178,"context_line":"                LOG.exception(_(\"Error in agent event loop\"))"},{"line_number":1179,"context_line":"                sync \u003d True"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9K9g%3D","line":1176,"updated":"2013-12-16 00:34:18.000000000","message":"rather than this kind of refactoring, I think it might make more sense to start using the LoopingCall as all the other neutron agents","commit_id":"e1efb687b709fa9ec48d348be1a064f970ac4ae7"}]}
