)]}'
{"neutron/plugins/ml2/drivers/ovn/agent/agent_health.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"462e6c5a1c25e188c6dc122d3a80ff2996691bce","unresolved":true,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def queue_update(self, agent_state):"},{"line_number":36,"context_line":"        with self._lock:"},{"line_number":37,"context_line":"            self._pending[agent_state[\u0027id\u0027]] \u003d agent_state"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def flush(self, plugin):"},{"line_number":40,"context_line":"        with self._lock:"}],"source_content_type":"text/x-python","patch_set":8,"id":"125f07da_23bec5f9","line":37,"updated":"2026-07-30 17:18:56.000000000","message":"as the key is unused, would a `set()` be a better datastructure to use here?","commit_id":"452719b379eb169ccd6ff419fe23382e8307dbf9"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"4c8811972e1a9a4bd94fa39760f040c35aa86080","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def queue_update(self, agent_state):"},{"line_number":36,"context_line":"        with self._lock:"},{"line_number":37,"context_line":"            self._pending[agent_state[\u0027id\u0027]] \u003d agent_state"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def flush(self, plugin):"},{"line_number":40,"context_line":"        with self._lock:"}],"source_content_type":"text/x-python","patch_set":8,"id":"81abd8a3_1a7ce1ae","line":37,"in_reply_to":"125f07da_23bec5f9","updated":"2026-08-04 13:41:46.000000000","message":"agent_state is a dict and unhasable so can\u0027t be stored in a set.","commit_id":"452719b379eb169ccd6ff419fe23382e8307dbf9"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"462e6c5a1c25e188c6dc122d3a80ff2996691bce","unresolved":true,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def flush(self, plugin):"},{"line_number":40,"context_line":"        with self._lock:"},{"line_number":41,"context_line":"            pending, self._pending \u003d self._pending, {}"},{"line_number":42,"context_line":"        if not pending:"},{"line_number":43,"context_line":"            return"},{"line_number":44,"context_line":"        context \u003d neutron_context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":8,"id":"b9778793_7a9e8844","line":41,"updated":"2026-07-30 17:18:56.000000000","message":"nit: we could `return` already here and avoid doing the \"swap\", couldn\u0027t we?","commit_id":"452719b379eb169ccd6ff419fe23382e8307dbf9"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"0eb729270b71cf7d0ef0ef57833d23e858c7addd","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def flush(self, plugin):"},{"line_number":40,"context_line":"        with self._lock:"},{"line_number":41,"context_line":"            pending, self._pending \u003d self._pending, {}"},{"line_number":42,"context_line":"        if not pending:"},{"line_number":43,"context_line":"            return"},{"line_number":44,"context_line":"        context \u003d neutron_context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":8,"id":"1d8223fc_a9fa1837","line":41,"in_reply_to":"a6d520b8_53f90439","updated":"2026-08-11 21:08:05.000000000","message":"yes","commit_id":"452719b379eb169ccd6ff419fe23382e8307dbf9"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"4c8811972e1a9a4bd94fa39760f040c35aa86080","unresolved":true,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def flush(self, plugin):"},{"line_number":40,"context_line":"        with self._lock:"},{"line_number":41,"context_line":"            pending, self._pending \u003d self._pending, {}"},{"line_number":42,"context_line":"        if not pending:"},{"line_number":43,"context_line":"            return"},{"line_number":44,"context_line":"        context \u003d neutron_context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":8,"id":"a6d520b8_53f90439","line":41,"in_reply_to":"b9778793_7a9e8844","updated":"2026-08-04 13:41:46.000000000","message":"You mean just move the `if not pending: return` up as a `if not self._pending`?","commit_id":"452719b379eb169ccd6ff419fe23382e8307dbf9"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"462e6c5a1c25e188c6dc122d3a80ff2996691bce","unresolved":true,"context_lines":[{"line_number":46,"context_line":"            for agent_state in pending.values():"},{"line_number":47,"context_line":"                try:"},{"line_number":48,"context_line":"                    with db_api.CONTEXT_WRITER.savepoint.using(context):"},{"line_number":49,"context_line":"                        plugin.create_or_update_agent(context, agent_state)"},{"line_number":50,"context_line":"                except Exception:"},{"line_number":51,"context_line":"                    LOG.exception(\u0027Failed to update OVN agent %s\u0027,"},{"line_number":52,"context_line":"                                  agent_state.get(\u0027id\u0027))"}],"source_content_type":"text/x-python","patch_set":8,"id":"57ffd4bc_03cc16e2","line":49,"updated":"2026-07-30 17:18:56.000000000","message":"we could introduce a batch `create_or_update` in the agent_db to avoid multiple transactions in a loop","commit_id":"452719b379eb169ccd6ff419fe23382e8307dbf9"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"4c8811972e1a9a4bd94fa39760f040c35aa86080","unresolved":false,"context_lines":[{"line_number":46,"context_line":"            for agent_state in pending.values():"},{"line_number":47,"context_line":"                try:"},{"line_number":48,"context_line":"                    with db_api.CONTEXT_WRITER.savepoint.using(context):"},{"line_number":49,"context_line":"                        plugin.create_or_update_agent(context, agent_state)"},{"line_number":50,"context_line":"                except Exception:"},{"line_number":51,"context_line":"                    LOG.exception(\u0027Failed to update OVN agent %s\u0027,"},{"line_number":52,"context_line":"                                  agent_state.get(\u0027id\u0027))"}],"source_content_type":"text/x-python","patch_set":8,"id":"2f435b0d_4b93b45b","line":49,"in_reply_to":"57ffd4bc_03cc16e2","updated":"2026-08-04 13:41:46.000000000","message":"this should be a single transaction here as well--I can move it to the agents_db code to make it more generally useful. should be fine as it is just additive.","commit_id":"452719b379eb169ccd6ff419fe23382e8307dbf9"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"462e6c5a1c25e188c6dc122d3a80ff2996691bce","unresolved":true,"context_lines":[{"line_number":49,"context_line":"                        plugin.create_or_update_agent(context, agent_state)"},{"line_number":50,"context_line":"                except Exception:"},{"line_number":51,"context_line":"                    LOG.exception(\u0027Failed to update OVN agent %s\u0027,"},{"line_number":52,"context_line":"                                  agent_state.get(\u0027id\u0027))"},{"line_number":53,"context_line":"        LOG.debug(\u0027Flushed %d pending OVN agent heartbeat update(s)\u0027,"},{"line_number":54,"context_line":"                  len(pending))"},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"e44f1a5b_7b4ba389","line":52,"updated":"2026-07-30 17:18:56.000000000","message":"Perhaps we should do\n```\nwith self._lock:\n    self._pending[agent_state[\u0027id\u0027]] \u003d agent_state\n```\nhere?","commit_id":"452719b379eb169ccd6ff419fe23382e8307dbf9"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"4c8811972e1a9a4bd94fa39760f040c35aa86080","unresolved":true,"context_lines":[{"line_number":49,"context_line":"                        plugin.create_or_update_agent(context, agent_state)"},{"line_number":50,"context_line":"                except Exception:"},{"line_number":51,"context_line":"                    LOG.exception(\u0027Failed to update OVN agent %s\u0027,"},{"line_number":52,"context_line":"                                  agent_state.get(\u0027id\u0027))"},{"line_number":53,"context_line":"        LOG.debug(\u0027Flushed %d pending OVN agent heartbeat update(s)\u0027,"},{"line_number":54,"context_line":"                  len(pending))"},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1de590f9_e34b0167","line":52,"in_reply_to":"e44f1a5b_7b4ba389","updated":"2026-08-04 13:41:46.000000000","message":"moving to agent_db code with a retry_if_inactive. I don\u0027t think re-queuing is likely to help if it fails for some reason that won\u0027t handle, so hopefully that decorator will be sufficient?","commit_id":"452719b379eb169ccd6ff419fe23382e8307dbf9"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"462e6c5a1c25e188c6dc122d3a80ff2996691bce","unresolved":true,"context_lines":[{"line_number":50,"context_line":"                except Exception:"},{"line_number":51,"context_line":"                    LOG.exception(\u0027Failed to update OVN agent %s\u0027,"},{"line_number":52,"context_line":"                                  agent_state.get(\u0027id\u0027))"},{"line_number":53,"context_line":"        LOG.debug(\u0027Flushed %d pending OVN agent heartbeat update(s)\u0027,"},{"line_number":54,"context_line":"                  len(pending))"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"45c629f0_64480107","line":53,"updated":"2026-07-30 17:18:56.000000000","message":"This may not be true if some of the agents failed the db write due to the exception above.","commit_id":"452719b379eb169ccd6ff419fe23382e8307dbf9"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"4c8811972e1a9a4bd94fa39760f040c35aa86080","unresolved":false,"context_lines":[{"line_number":50,"context_line":"                except Exception:"},{"line_number":51,"context_line":"                    LOG.exception(\u0027Failed to update OVN agent %s\u0027,"},{"line_number":52,"context_line":"                                  agent_state.get(\u0027id\u0027))"},{"line_number":53,"context_line":"        LOG.debug(\u0027Flushed %d pending OVN agent heartbeat update(s)\u0027,"},{"line_number":54,"context_line":"                  len(pending))"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"86db1ae4_e77fcbc8","line":53,"in_reply_to":"45c629f0_64480107","updated":"2026-08-04 13:41:46.000000000","message":"Done","commit_id":"452719b379eb169ccd6ff419fe23382e8307dbf9"}],"neutron/plugins/ml2/drivers/ovn/agent/neutron_agent.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"462e6c5a1c25e188c6dc122d3a80ff2996691bce","unresolved":true,"context_lines":[{"line_number":59,"context_line":"                \u0027chassis_name\u0027: self.chassis.name,"},{"line_number":60,"context_line":"                \u0027bridge-mappings\u0027:"},{"line_number":61,"context_line":"                    ovn_utils.get_ovn_bridge_mappings(self.chassis),"},{"line_number":62,"context_line":"                \u0027ovn-bridge\u0027: self.chassis_private.external_ids.get("},{"line_number":63,"context_line":"                    ovn_const.OVN_AGENT_OVN_BRIDGE, n_const.DEFAULT_BR_INT)},"},{"line_number":64,"context_line":"            \u0027agent_type\u0027: self.agent_type,"},{"line_number":65,"context_line":"            \u0027id\u0027: self.agent_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"07b7c0c9_c54f0189","line":62,"updated":"2026-07-30 17:18:56.000000000","message":"nit: this seems unrelated","commit_id":"452719b379eb169ccd6ff419fe23382e8307dbf9"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"4c8811972e1a9a4bd94fa39760f040c35aa86080","unresolved":false,"context_lines":[{"line_number":59,"context_line":"                \u0027chassis_name\u0027: self.chassis.name,"},{"line_number":60,"context_line":"                \u0027bridge-mappings\u0027:"},{"line_number":61,"context_line":"                    ovn_utils.get_ovn_bridge_mappings(self.chassis),"},{"line_number":62,"context_line":"                \u0027ovn-bridge\u0027: self.chassis_private.external_ids.get("},{"line_number":63,"context_line":"                    ovn_const.OVN_AGENT_OVN_BRIDGE, n_const.DEFAULT_BR_INT)},"},{"line_number":64,"context_line":"            \u0027agent_type\u0027: self.agent_type,"},{"line_number":65,"context_line":"            \u0027id\u0027: self.agent_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"a469f868_5e96c8c2","line":62,"in_reply_to":"07b7c0c9_c54f0189","updated":"2026-08-04 13:41:46.000000000","message":"the bind_port code grabs ovn-bridge from the agent state instead of from the chassis_private, which it no longer has access to.","commit_id":"452719b379eb169ccd6ff419fe23382e8307dbf9"}],"neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovsdb_monitor.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"462e6c5a1c25e188c6dc122d3a80ff2996691bce","unresolved":true,"context_lines":[{"line_number":916,"context_line":"        super().__init__(remote, schema, **kwargs)"},{"line_number":917,"context_line":"        self.driver \u003d driver"},{"line_number":918,"context_line":"        self._nb_idl \u003d nb_idl"},{"line_number":919,"context_line":"        self.pending_agent_updates \u003d agent_health.AgentHeartbeatBatcher()"},{"line_number":920,"context_line":"        self.notify_handler.watch_events(["},{"line_number":921,"context_line":"            ChassisAgentDownEvent(driver, self.pending_agent_updates),"},{"line_number":922,"context_line":"            ChassisAgentWriteEvent(driver, self.pending_agent_updates),"}],"source_content_type":"text/x-python","patch_set":8,"id":"e49ded1d_84fe72e7","line":919,"range":{"start_line":919,"start_character":13,"end_line":919,"end_character":34},"updated":"2026-07-30 17:18:56.000000000","message":"just wondering why do we name it like this and not as `heartbeat_batcher` or something similar?","commit_id":"452719b379eb169ccd6ff419fe23382e8307dbf9"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"4c8811972e1a9a4bd94fa39760f040c35aa86080","unresolved":false,"context_lines":[{"line_number":916,"context_line":"        super().__init__(remote, schema, **kwargs)"},{"line_number":917,"context_line":"        self.driver \u003d driver"},{"line_number":918,"context_line":"        self._nb_idl \u003d nb_idl"},{"line_number":919,"context_line":"        self.pending_agent_updates \u003d agent_health.AgentHeartbeatBatcher()"},{"line_number":920,"context_line":"        self.notify_handler.watch_events(["},{"line_number":921,"context_line":"            ChassisAgentDownEvent(driver, self.pending_agent_updates),"},{"line_number":922,"context_line":"            ChassisAgentWriteEvent(driver, self.pending_agent_updates),"}],"source_content_type":"text/x-python","patch_set":8,"id":"205f3c75_f901889b","line":919,"range":{"start_line":919,"start_character":13,"end_line":919,"end_character":34},"in_reply_to":"e49ded1d_84fe72e7","updated":"2026-08-04 13:41:46.000000000","message":"Done","commit_id":"452719b379eb169ccd6ff419fe23382e8307dbf9"}]}
