)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"ade59ec1204240ad6a41910eae0cc95682b12dbc","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"DHCP: Only use revision number to discard stale DHCP update"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"NetworkCache deleted_ports used for track stale data, but we also"},{"line_number":10,"context_line":"provide a method for this(using \u0027revision\u0027 field), we can remove"},{"line_number":11,"context_line":"the deleted_ports attribute here."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1f485f77_b3a6760e","line":9,"updated":"2017-11-17 21:54:43.000000000","message":"is used","commit_id":"167305c221c0ee8a7dc72cf5745f2b1df6270235"},{"author":{"_account_id":12860,"name":"Dongcan Ye","email":"yedongcan@yeah.net","username":"yedongcan"},"change_message_id":"c922fa24487e0eb776d0a50ef15a12dd18539a9f","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"DHCP: Only use revision number to discard stale DHCP update"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"NetworkCache deleted_ports used for track stale data, but we also"},{"line_number":10,"context_line":"provide a method for this(using \u0027revision\u0027 field), we can remove"},{"line_number":11,"context_line":"the deleted_ports attribute here."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1f485f77_673958d5","line":9,"in_reply_to":"1f485f77_b3a6760e","updated":"2017-11-18 04:00:56.000000000","message":"Done","commit_id":"167305c221c0ee8a7dc72cf5745f2b1df6270235"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"ade59ec1204240ad6a41910eae0cc95682b12dbc","unresolved":false,"context_lines":[{"line_number":7,"context_line":"DHCP: Only use revision number to discard stale DHCP update"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"NetworkCache deleted_ports used for track stale data, but we also"},{"line_number":10,"context_line":"provide a method for this(using \u0027revision\u0027 field), we can remove"},{"line_number":11,"context_line":"the deleted_ports attribute here."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I0bca03a67e8b0ff8f508cf59383340a13724e51c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1f485f77_93b13a4a","line":10,"updated":"2017-11-17 21:54:43.000000000","message":"are brackets necessary here? If yes than pleas add space between \"this\" and \"(\"","commit_id":"167305c221c0ee8a7dc72cf5745f2b1df6270235"},{"author":{"_account_id":12860,"name":"Dongcan Ye","email":"yedongcan@yeah.net","username":"yedongcan"},"change_message_id":"c922fa24487e0eb776d0a50ef15a12dd18539a9f","unresolved":false,"context_lines":[{"line_number":7,"context_line":"DHCP: Only use revision number to discard stale DHCP update"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"NetworkCache deleted_ports used for track stale data, but we also"},{"line_number":10,"context_line":"provide a method for this(using \u0027revision\u0027 field), we can remove"},{"line_number":11,"context_line":"the deleted_ports attribute here."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I0bca03a67e8b0ff8f508cf59383340a13724e51c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1f485f77_272fe088","line":10,"in_reply_to":"1f485f77_93b13a4a","updated":"2017-11-18 04:00:56.000000000","message":"Thanks, will update.","commit_id":"167305c221c0ee8a7dc72cf5745f2b1df6270235"}],"neutron/agent/dhcp/agent.py":[{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"3b5d3448a4cfbced7ec3b315bfc249b9bd026fb1","unresolved":false,"context_lines":[{"line_number":619,"context_line":"        self.deleted_ports \u003d set()"},{"line_number":620,"context_line":""},{"line_number":621,"context_line":"    def is_port_message_stale(self, payload):"},{"line_number":622,"context_line":"        orig \u003d self.get_port_by_id(payload[\u0027id\u0027]) or {}"},{"line_number":623,"context_line":"        if orig.get(\u0027revision_number\u0027, 0) \u003e payload.get(\u0027revision_number\u0027, 0):"},{"line_number":624,"context_line":"            return True"},{"line_number":625,"context_line":"        if payload[\u0027id\u0027] in self.deleted_ports:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff82abbf_81273813","side":"PARENT","line":622,"range":{"start_line":622,"start_character":8,"end_line":622,"end_character":55},"updated":"2017-11-21 05:53:57.000000000","message":"If port has been deleted, the is_port_message_stale() returns False and then process of port_update_end() runs.","commit_id":"59c36df75bcbcbcd87f07d1434c62c222ce27188"},{"author":{"_account_id":12860,"name":"Dongcan Ye","email":"yedongcan@yeah.net","username":"yedongcan"},"change_message_id":"f7c7676ef3bf027f36f3e52fcfc5b82ae39179b6","unresolved":false,"context_lines":[{"line_number":619,"context_line":"        self.deleted_ports \u003d set()"},{"line_number":620,"context_line":""},{"line_number":621,"context_line":"    def is_port_message_stale(self, payload):"},{"line_number":622,"context_line":"        orig \u003d self.get_port_by_id(payload[\u0027id\u0027]) or {}"},{"line_number":623,"context_line":"        if orig.get(\u0027revision_number\u0027, 0) \u003e payload.get(\u0027revision_number\u0027, 0):"},{"line_number":624,"context_line":"            return True"},{"line_number":625,"context_line":"        if payload[\u0027id\u0027] in self.deleted_ports:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff82abbf_7832e5f3","side":"PARENT","line":622,"range":{"start_line":622,"start_character":8,"end_line":622,"end_character":55},"in_reply_to":"ff82abbf_81273813","updated":"2017-11-21 09:14:39.000000000","message":"Done","commit_id":"59c36df75bcbcbcd87f07d1434c62c222ce27188"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"3b5d3448a4cfbced7ec3b315bfc249b9bd026fb1","unresolved":false,"context_lines":[{"line_number":622,"context_line":"        orig \u003d self.get_port_by_id(payload[\u0027id\u0027]) or {}"},{"line_number":623,"context_line":"        if orig.get(\u0027revision_number\u0027, 0) \u003e payload.get(\u0027revision_number\u0027, 0):"},{"line_number":624,"context_line":"            return True"},{"line_number":625,"context_line":"        if payload[\u0027id\u0027] in self.deleted_ports:"},{"line_number":626,"context_line":"            return True"},{"line_number":627,"context_line":"        return False"},{"line_number":628,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ff82abbf_a1527c66","side":"PARENT","line":625,"range":{"start_line":625,"start_character":11,"end_line":625,"end_character":46},"updated":"2017-11-21 05:53:57.000000000","message":"How about change self.deleted_ports.pop(payload[\u0027id\u0027])? Although I guess that the change keeps low probalibity of race condition issue...","commit_id":"59c36df75bcbcbcd87f07d1434c62c222ce27188"},{"author":{"_account_id":12860,"name":"Dongcan Ye","email":"yedongcan@yeah.net","username":"yedongcan"},"change_message_id":"f7c7676ef3bf027f36f3e52fcfc5b82ae39179b6","unresolved":false,"context_lines":[{"line_number":622,"context_line":"        orig \u003d self.get_port_by_id(payload[\u0027id\u0027]) or {}"},{"line_number":623,"context_line":"        if orig.get(\u0027revision_number\u0027, 0) \u003e payload.get(\u0027revision_number\u0027, 0):"},{"line_number":624,"context_line":"            return True"},{"line_number":625,"context_line":"        if payload[\u0027id\u0027] in self.deleted_ports:"},{"line_number":626,"context_line":"            return True"},{"line_number":627,"context_line":"        return False"},{"line_number":628,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ff82abbf_58b84129","side":"PARENT","line":625,"range":{"start_line":625,"start_character":11,"end_line":625,"end_character":46},"in_reply_to":"ff82abbf_a1527c66","updated":"2017-11-21 09:14:39.000000000","message":"Yes, This can delete the stale port in port_update, maybe we need to consider a better method to deal with port_delete.","commit_id":"59c36df75bcbcbcd87f07d1434c62c222ce27188"},{"author":{"_account_id":25618,"name":"Paweł Suder","email":"pawel@suder.info","username":"SuderPawel"},"change_message_id":"258cc77e76af80b48da1ecc3d437c9541e96f1aa","unresolved":false,"context_lines":[{"line_number":623,"context_line":"        if orig.get(\u0027revision_number\u0027, 0) \u003e payload.get(\u0027revision_number\u0027, 0):"},{"line_number":624,"context_line":"            return True"},{"line_number":625,"context_line":"        if payload[\u0027id\u0027] in self.deleted_ports:"},{"line_number":626,"context_line":"            self.deleted_ports.remove(payload[\u0027id\u0027])"},{"line_number":627,"context_line":"            return True"},{"line_number":628,"context_line":"        return False"},{"line_number":629,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7f96bb07_4a8ff922","line":626,"range":{"start_line":626,"start_character":12,"end_line":626,"end_character":52},"updated":"2018-01-12 08:32:23.000000000","message":"How about changes in tests?","commit_id":"96618531b0d8c4240e7b39feb1abc128ec3412b2"},{"author":{"_account_id":12860,"name":"Dongcan Ye","email":"yedongcan@yeah.net","username":"yedongcan"},"change_message_id":"b00e95e0b323fc9f684f9d2bae6c1912e65be7e2","unresolved":false,"context_lines":[{"line_number":623,"context_line":"        if orig.get(\u0027revision_number\u0027, 0) \u003e payload.get(\u0027revision_number\u0027, 0):"},{"line_number":624,"context_line":"            return True"},{"line_number":625,"context_line":"        if payload[\u0027id\u0027] in self.deleted_ports:"},{"line_number":626,"context_line":"            self.deleted_ports.remove(payload[\u0027id\u0027])"},{"line_number":627,"context_line":"            return True"},{"line_number":628,"context_line":"        return False"},{"line_number":629,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7f96bb07_e5ccf68a","line":626,"range":{"start_line":626,"start_character":12,"end_line":626,"end_character":52},"in_reply_to":"7f96bb07_4a8ff922","updated":"2018-01-12 08:58:48.000000000","message":"Done, I will add.","commit_id":"96618531b0d8c4240e7b39feb1abc128ec3412b2"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"9d144c03d9218c81129b48c456bf585d22971132","unresolved":false,"context_lines":[{"line_number":645,"context_line":"        if orig.get(\u0027revision_number\u0027, 0) \u003e payload.get(\u0027revision_number\u0027, 0):"},{"line_number":646,"context_line":"            return True"},{"line_number":647,"context_line":"        if payload[\u0027id\u0027] in self.deleted_ports:"},{"line_number":648,"context_line":"            self.deleted_ports.remove(payload[\u0027id\u0027])"},{"line_number":649,"context_line":"            return True"},{"line_number":650,"context_line":"        return False"},{"line_number":651,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_606d4998","line":648,"updated":"2018-06-15 16:17:30.000000000","message":"mhhh, I may be missing something, but how do we know this is the last time this agent hears from this port? If we remove it and the agent gets another message about this port, this path is going to execute: https://github.com/openstack/neutron/blob/master/neutron/agent/dhcp/agent.py#L432. In my opinion, we need a little more sophisticated aging mechanism","commit_id":"4bed3afdc47893ea0b28b087010033b33c734370"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"eab78e0d554434cea05bd4695856267d8116d5c1","unresolved":false,"context_lines":[{"line_number":645,"context_line":"        if orig.get(\u0027revision_number\u0027, 0) \u003e payload.get(\u0027revision_number\u0027, 0):"},{"line_number":646,"context_line":"            return True"},{"line_number":647,"context_line":"        if payload[\u0027id\u0027] in self.deleted_ports:"},{"line_number":648,"context_line":"            self.deleted_ports.remove(payload[\u0027id\u0027])"},{"line_number":649,"context_line":"            return True"},{"line_number":650,"context_line":"        return False"},{"line_number":651,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_a0b361e9","line":648,"in_reply_to":"5f7c97a3_606d4998","updated":"2018-06-15 16:32:11.000000000","message":"Furthermore, if he agent never gets a stale message for a given port, we will still be leaving a lot of outdated ports in deleted_ports. So we are not really cleaning it. Again, in my opinion, this calls for a proper aging mechanism","commit_id":"4bed3afdc47893ea0b28b087010033b33c734370"},{"author":{"_account_id":12860,"name":"Dongcan Ye","email":"yedongcan@yeah.net","username":"yedongcan"},"change_message_id":"94aa3eff5ef1fb0637d73c16b3829158a6faba58","unresolved":false,"context_lines":[{"line_number":645,"context_line":"        if orig.get(\u0027revision_number\u0027, 0) \u003e payload.get(\u0027revision_number\u0027, 0):"},{"line_number":646,"context_line":"            return True"},{"line_number":647,"context_line":"        if payload[\u0027id\u0027] in self.deleted_ports:"},{"line_number":648,"context_line":"            self.deleted_ports.remove(payload[\u0027id\u0027])"},{"line_number":649,"context_line":"            return True"},{"line_number":650,"context_line":"        return False"},{"line_number":651,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_9d5959fe","line":648,"in_reply_to":"5f7c97a3_a0b361e9","updated":"2018-06-23 02:49:31.000000000","message":"Done","commit_id":"4bed3afdc47893ea0b28b087010033b33c734370"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"5d26b0ec2649821bda5f6eb2c97498722ca10178","unresolved":false,"context_lines":[{"line_number":787,"context_line":"        self._deleted_ports \u003d set()"},{"line_number":788,"context_line":"        self._deleted_ports_ts \u003d []"},{"line_number":789,"context_line":"        cleanup_fn \u003d functools.partial(self.cleanup_deleted_ports,"},{"line_number":790,"context_line":"                                       DELETED_PORT_MAX_AGE)"},{"line_number":791,"context_line":"        self.cleanup_loop \u003d loopingcall.FixedIntervalLoopingCall(cleanup_fn)"},{"line_number":792,"context_line":"        self.cleanup_loop.start(DELETED_PORT_MAX_AGE,"},{"line_number":793,"context_line":"                                initial_delay\u003dDELETED_PORT_MAX_AGE)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fb8cfa7_9d6de133","line":790,"range":{"start_line":790,"start_character":39,"end_line":790,"end_character":59},"updated":"2019-06-25 16:50:55.000000000","message":"Actually I can use directly this variable inside the function, instead of creating the partial function to be used in the loop call. What do you think?","commit_id":"5ea65321b47f49d40eea87761b07b406207b3d04"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"85ed867dd5ca14e9d7d8d29e3b47eb436475b024","unresolved":false,"context_lines":[{"line_number":787,"context_line":"        self._deleted_ports \u003d set()"},{"line_number":788,"context_line":"        self._deleted_ports_ts \u003d []"},{"line_number":789,"context_line":"        cleanup_fn \u003d functools.partial(self.cleanup_deleted_ports,"},{"line_number":790,"context_line":"                                       DELETED_PORT_MAX_AGE)"},{"line_number":791,"context_line":"        self.cleanup_loop \u003d loopingcall.FixedIntervalLoopingCall(cleanup_fn)"},{"line_number":792,"context_line":"        self.cleanup_loop.start(DELETED_PORT_MAX_AGE,"},{"line_number":793,"context_line":"                                initial_delay\u003dDELETED_PORT_MAX_AGE)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fb8cfa7_07d0b21e","line":790,"range":{"start_line":790,"start_character":39,"end_line":790,"end_character":59},"in_reply_to":"9fb8cfa7_9d6de133","updated":"2019-06-27 08:42:27.000000000","message":"IMO good idea","commit_id":"5ea65321b47f49d40eea87761b07b406207b3d04"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"85ed867dd5ca14e9d7d8d29e3b47eb436475b024","unresolved":false,"context_lines":[{"line_number":893,"context_line":"        The variable \"self._deleted_ports_ts\" contains a timestamp"},{"line_number":894,"context_line":"        ordered list of tuples (timestamp, port_id). Every port older than the"},{"line_number":895,"context_line":"        current timestamp minus \"timestamp_delta\" will be deleted from"},{"line_number":896,"context_line":"        \"self._deleted_ports\" and \"self._deleted_ports_ts\"."},{"line_number":897,"context_line":"        \"\"\""},{"line_number":898,"context_line":"        timestamp_min \u003d timeutils.utcnow_ts() - timestamp_delta"},{"line_number":899,"context_line":"        idx \u003d None"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fb8cfa7_47a78abd","line":896,"updated":"2019-06-27 08:42:27.000000000","message":"why You need two places to store and delete it? Why can\u0027t it be just stored in self.deleted_ports with timestamp?","commit_id":"5ea65321b47f49d40eea87761b07b406207b3d04"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"750da077528edd483c51808a345738b2c573a7b7","unresolved":false,"context_lines":[{"line_number":893,"context_line":"        The variable \"self._deleted_ports_ts\" contains a timestamp"},{"line_number":894,"context_line":"        ordered list of tuples (timestamp, port_id). Every port older than the"},{"line_number":895,"context_line":"        current timestamp minus \"timestamp_delta\" will be deleted from"},{"line_number":896,"context_line":"        \"self._deleted_ports\" and \"self._deleted_ports_ts\"."},{"line_number":897,"context_line":"        \"\"\""},{"line_number":898,"context_line":"        timestamp_min \u003d timeutils.utcnow_ts() - timestamp_delta"},{"line_number":899,"context_line":"        idx \u003d None"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fb8cfa7_912369a7","line":896,"in_reply_to":"9fb8cfa7_47a78abd","updated":"2019-06-27 09:44:38.000000000","message":"Thank you for your question, because I spotted out a bug.\n\n- \"_deleted_ports\" is a set to avoid port duplications. If a port has been deleted previously, any call to \"add_to_deleted_ports\" won\u0027t have any effect\n- I have a second variable to have an timestamp ordered list. This can duplicate the memory used, but speeds up the logic.\n\nCurrently I\u0027m not applying this logic. I\u0027ll update the patch and I\u0027ll add a test for this.","commit_id":"5ea65321b47f49d40eea87761b07b406207b3d04"}]}
