)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"e86fb8791bed39bcf55e617018f93c45c0b62bdc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"5d51708b_2278496d","updated":"2022-09-22 08:56:57.000000000","message":"Thanks for working on this Rodolfo!","commit_id":"819a1bb3e6f3b10a1887e2ef836c138e02f8b996"}],"neutron/common/ovn/hash_ring_manager.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"276da9179704a1a3579a63fc8d2a7f5765047ce0","unresolved":true,"context_lines":[{"line_number":73,"context_line":"            self._prev_num_nodes \u003d num_nodes"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        return True"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def _load_hash_ring(self, refresh\u003dFalse):"},{"line_number":78,"context_line":"        cache_timeout \u003d timeutils.utcnow() - datetime.timedelta("},{"line_number":79,"context_line":"            seconds\u003dconstants.HASH_RING_CACHE_TIMEOUT)"}],"source_content_type":"text/x-python","patch_set":3,"id":"e79fd56d_7cccccd5","line":76,"updated":"2022-09-21 13:51:58.000000000","message":"I am not opposed by the current proposal but, I was wondering... Wouldn\u0027t be simpler to move the _clear_hash_ring() method to this class and add lock between it and _load_hash_ring() to prevent both methods from being called concurrently ?\n\n.. mech_driver.py:\n\n def initialize():\n     ...\n     self._hash_ring_lock \u003d threading.Event()\n     self._hash_ring_lock.clear()\n \n.. hash_ring_manager.py:\n\n # _hash_ring_lock passed via the class constructor\n\n def _clear_hash_ring():\n     ...\n     self._hash_ring_lock.set()\n     \n def _load_hash_ring():\n     self._hash_ring_lock.wait()\n     ...","commit_id":"9ea8c364774691c51c58d2b29401dcce964555d3"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"759f71c9d86d5b96fcfbea06900383dbbea2b0c6","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            self._prev_num_nodes \u003d num_nodes"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        return True"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def _load_hash_ring(self, refresh\u003dFalse):"},{"line_number":78,"context_line":"        cache_timeout \u003d timeutils.utcnow() - datetime.timedelta("},{"line_number":79,"context_line":"            seconds\u003dconstants.HASH_RING_CACHE_TIMEOUT)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fde589fb_b806481a","line":76,"in_reply_to":"e79fd56d_7cccccd5","updated":"2022-09-22 07:50:52.000000000","message":"That won\u0027t prevent the clash between two Neutron servers. This is what is preventing this implementation. By default, if only one Neutron server is spawned, this situation should not happen because the table cleanup is executed before the API workers are spawned (and the node registers are created and the OVN events start coming, forcing the DB read).\n\nBut when server 1 is spawning the API workers and executing those consecutive SQL table reads (hundreds per second) and server 2 starts and tries to cleanup the table, is at this moment when we have the DB lock.","commit_id":"9ea8c364774691c51c58d2b29401dcce964555d3"}],"neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/maintenance.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"e86fb8791bed39bcf55e617018f93c45c0b62bdc","unresolved":true,"context_lines":[{"line_number":840,"context_line":"            hash_ring_db.remove_nodes_from_host("},{"line_number":841,"context_line":"                self.ctx, self._group, created_before\u003dself._created_time)"},{"line_number":842,"context_line":"        except db_exc.DBError as exc:"},{"line_number":843,"context_line":"            LOG.info(\u0027The \"ovn_hash_ring\" table was not cleaned; the \u0027"},{"line_number":844,"context_line":"                     \u0027operation will be retried. Error: %s\u0027,"},{"line_number":845,"context_line":"                     str(exc))"},{"line_number":846,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":4,"id":"743f37e6_a8d3c0ed","line":843,"range":{"start_line":843,"start_character":16,"end_line":843,"end_character":20},"updated":"2022-09-22 08:56:57.000000000","message":"Nit: Sounds more like a warning","commit_id":"819a1bb3e6f3b10a1887e2ef836c138e02f8b996"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"a3d9abb5ffc8d11709491330504659597f7741b5","unresolved":true,"context_lines":[{"line_number":840,"context_line":"            hash_ring_db.remove_nodes_from_host("},{"line_number":841,"context_line":"                self.ctx, self._group, created_before\u003dself._created_time)"},{"line_number":842,"context_line":"        except db_exc.DBError as exc:"},{"line_number":843,"context_line":"            LOG.info(\u0027The \"ovn_hash_ring\" table was not cleaned; the \u0027"},{"line_number":844,"context_line":"                     \u0027operation will be retried. Error: %s\u0027,"},{"line_number":845,"context_line":"                     str(exc))"},{"line_number":846,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":4,"id":"326286fd_060152ff","line":843,"range":{"start_line":843,"start_character":16,"end_line":843,"end_character":20},"in_reply_to":"743f37e6_a8d3c0ed","updated":"2022-09-22 09:00:58.000000000","message":"Well... because this is going to be retried in the next loop until the table cleanup is achieved, I prefer to keep it in INFO level, to avoid noise in the logs.","commit_id":"819a1bb3e6f3b10a1887e2ef836c138e02f8b996"}]}
