)]}'
{"neutron/db/db_base_plugin_v2.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"22390a8b07aa9d1c040654c51b45ef0dc9660de7","unresolved":true,"context_lines":[{"line_number":1460,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1461,"context_line":"    def update_port(self, context, id, port, db_port\u003dNone):"},{"line_number":1462,"context_line":"        new_port \u003d port[\u0027port\u0027]"},{"line_number":1463,"context_line":""},{"line_number":1464,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1465,"context_line":"            db_port \u003d db_port or self._get_port(context, id)"},{"line_number":1466,"context_line":"            new_mac \u003d new_port.get(\u0027mac_address\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"0c485bda_5e8ec7ee","line":1463,"updated":"2021-04-13 17:39:47.000000000","message":"I would add a check here: if NOT context.session.is_active, then clean db_port\n\n    db_port \u003d db_port if context.session.is_active else None\n\n\nThat will prevent from using a DB object in the next context that does not belong to the required active session.","commit_id":"f065d69f56eaced86a3f51fed99b4c15a0fc5fd8"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d62cbe6cb11aecf292c221748e4c3144163f41a6","unresolved":true,"context_lines":[{"line_number":1460,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1461,"context_line":"    def update_port(self, context, id, port, db_port\u003dNone):"},{"line_number":1462,"context_line":"        new_port \u003d port[\u0027port\u0027]"},{"line_number":1463,"context_line":""},{"line_number":1464,"context_line":"        with db_api.CONTEXT_WRITER.using(context):"},{"line_number":1465,"context_line":"            db_port \u003d db_port or self._get_port(context, id)"},{"line_number":1466,"context_line":"            new_mac \u003d new_port.get(\u0027mac_address\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"0c89e13c_9498e832","line":1463,"in_reply_to":"0c485bda_5e8ec7ee","updated":"2021-04-14 06:53:02.000000000","message":"Sure, thanks for suggestion!","commit_id":"f065d69f56eaced86a3f51fed99b4c15a0fc5fd8"}]}
